Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad74402

Browse files
committed
Merge 3.5
2 parents fa34dc2 + 89d8d8b commit ad74402

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Lib/sysconfig.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,12 @@ def _parse_makefile(filename, vars=None):
260260
while len(variables) > 0:
261261
for name in tuple(variables):
262262
value = notdone[name]
263-
m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
263+
m1 = _findvar1_rx.search(value)
264+
m2 = _findvar2_rx.search(value)
265+
if m1 and m2:
266+
m = m1 if m1.start() < m2.start() else m2
267+
else:
268+
m = m1 if m1 else m2
264269
if m is not None:
265270
n = m.group(1)
266271
found = True

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ Core and Builtins
131131
Library
132132
-------
133133

134+
- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
135+
appearing before $() vars.
136+
134137
- Issue #26069: Remove the deprecated apis in the trace module.
135138

136139
- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore

0 commit comments

Comments
 (0)