mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
(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").
This commit is contained in:
commit
17dc81951a
3 changed files with 31 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue