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
commit0bba4e05d6b26020380a12e9defc58b1c251acf0 (patch)
tree416f840a1a87803e9824a89d6e9af5020304d577 /Lib/sysconfig.py
parent8601a47054312817acd032fba5a79ee780eb86f7 (diff)
downloadcpython-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.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