]> granicus.if.org Git - python/commitdiff
Issue #13150: Add a comment in _sysconfigdata to explain the origin of this file
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 19 Oct 2011 22:41:21 +0000 (00:41 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 19 Oct 2011 22:41:21 +0000 (00:41 +0200)
Lib/sysconfig.py

index 36c7aa49a56e0d244f90b0eabafa0e3e0ee31b13..276e68370550a6a54b7d7a5fedd65c0301a1b589 100644 (file)
@@ -323,7 +323,6 @@ def _generate_posix_vars():
     """Generate the Python module containing build-time variables."""
     import pprint
     vars = {}
-    destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py')
     # load the installed Makefile:
     makefile = get_makefile_filename()
     try:
@@ -348,7 +347,11 @@ def _generate_posix_vars():
     # the scripts are in another directory.
     if _PYTHON_BUILD:
         vars['LDSHARED'] = vars['BLDSHARED']
+
+    destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py')
     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 = ')
         pprint.pprint(vars, stream=f)