- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars

appearing before $() vars.
This commit is contained in:
doko@ubuntu.com 2016-01-11 21:41:40 +01:00
parent 885e1939be
commit b2b1217270
2 changed files with 9 additions and 1 deletions

View File

@ -260,7 +260,12 @@ def _parse_makefile(filename, vars=None):
while len(variables) > 0: while len(variables) > 0:
for name in tuple(variables): for name in tuple(variables):
value = notdone[name] value = notdone[name]
m = _findvar1_rx.search(value) or _findvar2_rx.search(value) m1 = _findvar1_rx.search(value)
m2 = _findvar2_rx.search(value)
if m1 and m2:
m = m1 if m1.start() < m2.start() else m2
else:
m = m1 if m1 else m2
if m is not None: if m is not None:
n = m.group(1) n = m.group(1)
found = True found = True

View File

@ -44,6 +44,9 @@ Core and Builtins
Library Library
------- -------
- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
appearing before $() vars.
- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore - Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
original values after patching. Patch contributed by Sean McCully. original values after patching. Patch contributed by Sean McCully.