Blame uwsgi_ruby20_compatibility.patch
|
Ralf Ertzinger |
046b3f7 |
diff -uNr a/plugins/rack/uwsgiplugin.py b/plugins/rack/uwsgiplugin.py
|
|
Ralf Ertzinger |
36451ce |
--- a/plugins/rack/uwsgiplugin.py 2023-07-28 20:02:57.242903528 +0200
|
|
Ralf Ertzinger |
36451ce |
+++ b/plugins/rack/uwsgiplugin.py 2023-07-28 20:05:59.933863052 +0200
|
|
Ralf Ertzinger |
36451ce |
@@ -10,14 +10,14 @@
|
|
|
fe1aea3 |
rbconfig = 'Config'
|
|
|
fe1aea3 |
|
|
|
fe1aea3 |
version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
|
|
|
fe1aea3 |
-v = version.split('.')
|
|
Ralf Ertzinger |
046b3f7 |
+v = tuple(int(x) for x in version.split('.'))
|
|
|
fe1aea3 |
|
|
|
fe1aea3 |
GCC_LIST = ['rack_plugin', 'rack_api']
|
|
|
fe1aea3 |
|
|
|
fe1aea3 |
-if (v[0] == '1' and v[1] == '9') or v[0] >= '2':
|
|
Ralf Ertzinger |
046b3f7 |
+if v >= (1, 9):
|
|
|
fe1aea3 |
CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
|
|
|
fe1aea3 |
CFLAGS.append('-DRUBY19')
|
|
Ralf Ertzinger |
36451ce |
- if version >= '2.7':
|
|
Ralf Ertzinger |
36451ce |
+ if v >= (2, 7):
|
|
Ralf Ertzinger |
36451ce |
CFLAGS.append('-DRUBY27')
|
|
|
fe1aea3 |
CFLAGS.append('-Wno-unused-parameter')
|
|
Ralf Ertzinger |
36451ce |
rbconfig = 'RbConfig'
|
|
Ralf Ertzinger |
046b3f7 |
diff -uNr a/plugins/ruby19/uwsgiplugin.py b/plugins/ruby19/uwsgiplugin.py
|
|
Ralf Ertzinger |
36451ce |
--- a/plugins/ruby19/uwsgiplugin.py 2023-07-28 20:02:57.242903528 +0200
|
|
Ralf Ertzinger |
36451ce |
+++ b/plugins/ruby19/uwsgiplugin.py 2023-07-28 20:05:11.560403332 +0200
|
|
Ralf Ertzinger |
36451ce |
@@ -10,14 +10,14 @@
|
|
|
fe1aea3 |
rbconfig = 'Config'
|
|
|
fe1aea3 |
|
|
|
fe1aea3 |
version = os.popen(RUBYPATH + " -e \"print RUBY_VERSION\"").read().rstrip()
|
|
|
fe1aea3 |
-v = version.split('.')
|
|
Ralf Ertzinger |
046b3f7 |
+v = tuple(int(x) for x in version.split('.'))
|
|
|
fe1aea3 |
|
|
|
fe1aea3 |
GCC_LIST = ['../rack/rack_plugin', '../rack/rack_api']
|
|
|
fe1aea3 |
|
|
Ralf Ertzinger |
36451ce |
-if (v[0] == '1' and v[1] == '9') or v[0] >= '2':
|
|
Ralf Ertzinger |
046b3f7 |
+if v >= (1, 9):
|
|
|
fe1aea3 |
CFLAGS = os.popen(RUBYPATH + " -e \"require 'rbconfig';print RbConfig::CONFIG['CFLAGS']\"").read().rstrip().split()
|
|
|
fe1aea3 |
CFLAGS.append('-DRUBY19')
|
|
Ralf Ertzinger |
36451ce |
- if version >= '2.7':
|
|
Ralf Ertzinger |
36451ce |
+ if v >= (2, 7):
|
|
Ralf Ertzinger |
36451ce |
CFLAGS.append('-DRUBY27')
|
|
|
fe1aea3 |
CFLAGS.append('-Wno-unused-parameter')
|
|
Ralf Ertzinger |
36451ce |
rbconfig = 'RbConfig'
|