27 lines
1.3 KiB
Diff
27 lines
1.3 KiB
Diff
Link: https://gitlab.com/ita1024/waf/-/commit/8d6cbb3657bdbf2ad5ef33b8ba51f29747743e1d
|
|
Subject: Python: Use EXT_SUFFIX config var over the deprecated/removed SO
|
|
Bug: 152870
|
|
Tags: common
|
|
|
|
diff -rupN a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py
|
|
--- a/third_party/waf/waflib/Tools/python.py 2023-09-28 03:05:39.626040157 +0300
|
|
+++ b/third_party/waf/waflib/Tools/python.py 2023-09-28 03:07:41.536372764 +0300
|
|
@@ -315,7 +315,7 @@ def check_python_headers(conf, features=
|
|
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_python_variables(["get_config_var('%s') or ''" % x for x in v])
|
|
except RuntimeError:
|
|
@@ -328,7 +328,7 @@ def check_python_headers(conf, features=
|
|
x = 'MACOSX_DEPLOYMENT_TARGET'
|
|
if dct[x]:
|
|
env[x] = conf.environ[x] = 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
|