diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-24 23:37:07 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-24 23:37:07 +0200 |
commit | 0bba4e05d6b26020380a12e9defc58b1c251acf0 (patch) | |
tree | 416f840a1a87803e9824a89d6e9af5020304d577 /Lib/sysconfig.py | |
parent | 8601a47054312817acd032fba5a79ee780eb86f7 (diff) | |
download | cpython-0bba4e05d6b26020380a12e9defc58b1c251acf0.tar.gz |
Issue #12070: Fix the Makefile parser of the sysconfig module to handle
correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
Diffstat (limited to 'Lib/sysconfig.py')
-rw-r--r-- | Lib/sysconfig.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 41bccf37de..2279a51d5e 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -294,7 +294,7 @@ def _parse_makefile(filename, vars=None): variables.remove(name) if name.startswith('PY_') \ - and name[3:] in renamed_variables: + and name[3:] in renamed_variables: name = name[3:] if name not in done: @@ -302,7 +302,9 @@ def _parse_makefile(filename, vars=None): else: - # bogus variable reference; just drop it since we can't deal + # bogus variable reference (e.g. "prefix=$/opt/python"); + # just drop it since we can't deal + done[name] = value variables.remove(name) # strip spurious spaces |