Skip to content

Commit 60b8694

Browse files
Show FROZEN_MODULES_DEFAULT in sysconfig data.
1 parent 6946b19 commit 60b8694

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/sysconfig.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ def _generate_posix_vars():
436436
if _PYTHON_BUILD:
437437
vars['BLDSHARED'] = vars['LDSHARED']
438438

439+
Py_DEBUG = bool(vars['Py_DEBUG'])
440+
vars['FROZEN_MODULES_DEFAULT'] = 0 if Py_DEBUG else 1
441+
439442
# There's a chicken-and-egg situation on OS X with regards to the
440443
# _sysconfigdata module after the changes introduced by #15298:
441444
# get_config_vars() is called by get_platform() as part of the
@@ -490,6 +493,10 @@ def _init_non_posix(vars):
490493
vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
491494
vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
492495
vars['TZPATH'] = ''
496+
# infer build vars
497+
Py_DEBUG = hasattr(sys, 'gettotalrefcount')
498+
vars['Py_DEBUG'] = 1 if Py_DEBUG else 0
499+
vars['FROZEN_MODULES_DEFAULT'] = 0 if Py_DEBUG else 1
493500

494501
#
495502
# public APIs

0 commit comments

Comments
 (0)