2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00

Python: Use EXT_SUFFIX config var over the deprecated/removed SO

Fixes https://gitlab.com/ita1024/waf/-/issues/2386
This commit is contained in:
Miro Hrončok 2022-05-17 17:09:21 +02:00 committed by Thomas Nagy
parent 5d56dff596
commit b093e9eac7

View File

@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
conf.fatal('Could not find the python executable')
# so we actually do all this for compatibility reasons and for obtaining pyext_PATTERN below
v = 'prefix SO LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS LDVERSION'.split()
v = 'prefix SO EXT_SUFFIX LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS LDVERSION'.split()
try:
lst = conf.get_sysconfig_variables(variables=v)
except RuntimeError:
@ -341,7 +341,7 @@ def check_python_headers(conf, features='pyembed pyext'):
x = 'MACOSX_DEPLOYMENT_TARGET'
if dct[x]:
env[x] = conf.environ[x] = str(dct[x])
env.pyext_PATTERN = '%s' + dct['SO'] # not a mistake
env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
# Try to get pythonX.Y-config