File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments