mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
wscript: Use EXT_SUFFIX when available to fix build on Py 3.11
This is a backport of a an upstream fix in waf's check_python_headers().
See: 8d6cbb3657
This commit is contained in:
4
wscript
4
wscript
@@ -383,7 +383,7 @@ def my_check_python_headers(conf):
|
||||
if not pybin:
|
||||
conf.fatal('Could not find the python executable')
|
||||
|
||||
v = 'prefix SO LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS'.split()
|
||||
v = 'prefix SO EXT_SUFFIX LDFLAGS LIBDIR LIBPL INCLUDEPY Py_ENABLE_SHARED MACOSX_DEPLOYMENT_TARGET LDSHARED CFLAGS'.split()
|
||||
try:
|
||||
lst = conf.get_python_variables(["get_config_var('%s') or ''" % x for x in v])
|
||||
except RuntimeError:
|
||||
@@ -397,7 +397,7 @@ def my_check_python_headers(conf):
|
||||
if dct[x]:
|
||||
conf.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
|
||||
|
||||
# Check for python libraries for embedding
|
||||
all_flags = dct['LDFLAGS'] + ' ' + dct['CFLAGS']
|
||||
|
||||
Reference in New Issue
Block a user