mirror of https://gitlab.com/ita1024/waf.git
Merge branch 'python3_ext_suffix' into 'master'
Python sysconfig variable 'SO' is deprecated See merge request ita1024/waf!2338
This commit is contained in:
commit
02bb17ba6a
|
@ -315,7 +315,8 @@ def check_python_headers(conf, features='pyembed pyext'):
|
||||||
conf.fatal('Could not find the python executable')
|
conf.fatal('Could not find the python executable')
|
||||||
|
|
||||||
# so we actually do all this for compatibility reasons and for obtaining pyext_PATTERN below
|
# 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 LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS LDVERSION'.split()
|
||||||
|
v.append('SO' if sys.hexversion < 0x03070000 else 'EXT_SUFFIX')
|
||||||
try:
|
try:
|
||||||
lst = conf.get_python_variables(["get_config_var('%s') or ''" % x for x in v])
|
lst = conf.get_python_variables(["get_config_var('%s') or ''" % x for x in v])
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
|
@ -328,7 +329,7 @@ def check_python_headers(conf, features='pyembed pyext'):
|
||||||
x = 'MACOSX_DEPLOYMENT_TARGET'
|
x = 'MACOSX_DEPLOYMENT_TARGET'
|
||||||
if dct[x]:
|
if dct[x]:
|
||||||
env[x] = conf.environ[x] = str(dct[x])
|
env[x] = conf.environ[x] = str(dct[x])
|
||||||
env.pyext_PATTERN = '%s' + dct['SO'] # not a mistake
|
env.pyext_PATTERN = '%s' + dct['SO' if sys.hexversion < 0x03070000 else 'EXT_SUFFIX'] # not a mistake
|
||||||
|
|
||||||
|
|
||||||
# Try to get pythonX.Y-config
|
# Try to get pythonX.Y-config
|
||||||
|
@ -646,4 +647,3 @@ def options(opt):
|
||||||
help='Installation path for python modules (py, platform-independent .py and .pyc files)')
|
help='Installation path for python modules (py, platform-independent .py and .pyc files)')
|
||||||
pyopt.add_option('--pythonarchdir', dest='pythonarchdir',
|
pyopt.add_option('--pythonarchdir', dest='pythonarchdir',
|
||||||
help='Installation path for python extension (pyext, platform-dependent .so or .dylib files)')
|
help='Installation path for python extension (pyext, platform-dependent .so or .dylib files)')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue