Skip to content

Commit cb04312

Browse files
committed
Try fix WASM build with Py_DEBUG
1 parent 949fd46 commit cb04312

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

Lib/sysconfig/__main__.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,6 @@ def _print_config_dict(d, stream):
160160
print ("}", file=stream)
161161

162162

163-
def _get_pybuilddir(py_debug=None):
164-
pybuilddir = f'build/lib.{get_platform()}-{get_python_version()}'
165-
if py_debug is None:
166-
py_debug = get_config_var('Py_DEBUG')
167-
if py_debug:
168-
pybuilddir += '-pydebug'
169-
return pybuilddir
170-
171-
172163
def _get_json_data_name():
173164
name = _get_sysconfigdata_name()
174165
assert name.startswith('_sysconfigdata')
@@ -222,7 +213,10 @@ def _generate_posix_vars():
222213
module.build_time_vars = vars
223214
sys.modules[name] = module
224215

225-
pybuilddir = _get_pybuilddir(vars['Py_DEBUG'])
216+
pybuilddir = os.environ.get(
217+
'_PYTHON_SYSCONFIGDATA_PATH',
218+
f'build/lib.{get_platform()}-{get_python_version()}',
219+
)
226220
os.makedirs(pybuilddir, exist_ok=True)
227221
destfile = os.path.join(pybuilddir, name + '.py')
228222

0 commit comments

Comments
 (0)