diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2016-01-11 20:41:40 (GMT) |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2016-01-11 20:41:40 (GMT) |
commit | b2b12172706df5e4686a5fccdcf88ebe22ee5b5f (patch) | |
tree | ee96d49307dd43d1f446d4b4ba38b99519c10df5 /Lib | |
parent | 885e1939beb3ab95cc4e06d86815261256cd1d03 (diff) | |
download | cpython-b2b12172706df5e4686a5fccdcf88ebe22ee5b5f.zip cpython-b2b12172706df5e4686a5fccdcf88ebe22ee5b5f.tar.gz cpython-b2b12172706df5e4686a5fccdcf88ebe22ee5b5f.tar.bz2 |
- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
appearing before $() vars.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/sysconfig.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index 137932e..9c34be0 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -260,7 +260,12 @@ def _parse_makefile(filename, vars=None): while len(variables) > 0: for name in tuple(variables): 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: n = m.group(1) found = True |