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():
436
436
if _PYTHON_BUILD :
437
437
vars ['BLDSHARED' ] = vars ['LDSHARED' ]
438
438
439
+ Py_DEBUG = bool (vars ['Py_DEBUG' ])
440
+ vars ['FROZEN_MODULES_DEFAULT' ] = 0 if Py_DEBUG else 1
441
+
439
442
# There's a chicken-and-egg situation on OS X with regards to the
440
443
# _sysconfigdata module after the changes introduced by #15298:
441
444
# get_config_vars() is called by get_platform() as part of the
@@ -490,6 +493,10 @@ def _init_non_posix(vars):
490
493
vars ['VERSION' ] = _PY_VERSION_SHORT_NO_DOT
491
494
vars ['BINDIR' ] = os .path .dirname (_safe_realpath (sys .executable ))
492
495
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
493
500
494
501
#
495
502
# public APIs
You can’t perform that action at this time.
0 commit comments