Issue #12070: Fix the Makefile parser of the sysconfig module to handle
correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 41bccf3..2279a51 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -294,7 +294,7 @@
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 @@
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