Kaydet (Commit) 65651ea3 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #13150: Add a comment in _sysconfigdata to explain the origin of this file

üst daaaec9e
...@@ -323,7 +323,6 @@ def _generate_posix_vars(): ...@@ -323,7 +323,6 @@ def _generate_posix_vars():
"""Generate the Python module containing build-time variables.""" """Generate the Python module containing build-time variables."""
import pprint import pprint
vars = {} vars = {}
destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py')
# load the installed Makefile: # load the installed Makefile:
makefile = get_makefile_filename() makefile = get_makefile_filename()
try: try:
...@@ -348,7 +347,11 @@ def _generate_posix_vars(): ...@@ -348,7 +347,11 @@ def _generate_posix_vars():
# the scripts are in another directory. # the scripts are in another directory.
if _PYTHON_BUILD: if _PYTHON_BUILD:
vars['LDSHARED'] = vars['BLDSHARED'] vars['LDSHARED'] = vars['BLDSHARED']
destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py')
with open(destfile, 'w', encoding='utf8') as f: with open(destfile, 'w', encoding='utf8') as f:
f.write('# system configuration generated and used by'
' the sysconfig module\n')
f.write('build_time_vars = ') f.write('build_time_vars = ')
pprint.pprint(vars, stream=f) pprint.pprint(vars, stream=f)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment