mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
d48ba0bde5
commit
1273b7cd9c
3 changed files with 31 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue