summaryrefslogtreecommitdiff
path: root/Lib/sysconfig.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-24 23:37:07 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-24 23:37:07 +0200
commit1273b7cd9ccd19a168d3def5c7d1479c5fb6119a (patch)
tree3d4a58fd5919023cc7db0ff2ceff8e7a4103d53e /Lib/sysconfig.py
parentd48ba0bde5bd535e9aa4c90cb122c0197f862e68 (diff)
downloadcpython-git-1273b7cd9ccd19a168d3def5c7d1479c5fb6119a.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.py6
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