summaryrefslogtreecommitdiffstats
path: root/Lib/sysconfig.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-24 21:38:03 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-24 21:38:03 (GMT)
commit17dc81951acac1e6e6488357085003b3d9a9f48f (patch)
tree063ec6488cc0f2c8e18a214bbfdaafd7a4f7a1e4 /Lib/sysconfig.py
parenteb734f77adb23a3cfe90a21679b74aee404d1a31 (diff)
parent1273b7cd9ccd19a168d3def5c7d1479c5fb6119a (diff)
downloadcpython-17dc81951acac1e6e6488357085003b3d9a9f48f.zip
cpython-17dc81951acac1e6e6488357085003b3d9a9f48f.tar.gz
cpython-17dc81951acac1e6e6488357085003b3d9a9f48f.tar.bz2
(Merge 3.2) 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 4c1fd1b..63becb2 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -287,14 +287,16 @@ 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:
done[name] = value
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