[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2016-01-28 Thread Berker Peksag

Berker Peksag added the comment:

I've added a test case for ef84d21f5292. I think this can be closed now. Please 
reopen if not.

--
nosy: +berker.peksag
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2016-01-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dec734dfe2fe by Berker Peksag in branch '3.5':
Issue #24705: Add a test case for ef84d21f5292
https://hg.python.org/cpython/rev/dec734dfe2fe

New changeset f9a18032cc22 by Berker Peksag in branch 'default':
Issue #24705: Add a test case for ef84d21f5292
https://hg.python.org/cpython/rev/f9a18032cc22

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2016-01-11 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef84d21f5292 by doko in branch '3.5':
- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
https://hg.python.org/cpython/rev/ef84d21f5292

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2015-07-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please provide an example where unpatched code fails but patched code 
work?

--
nosy: +serhiy.storchaka, tarek
stage:  - test needed
type:  - behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24705
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2015-07-24 Thread Matthias Klose

Matthias Klose added the comment:

On 07/24/2015 03:14 PM, Serhiy Storchaka wrote:

 Serhiy Storchaka added the comment:

 Could you please provide an example where unpatched code fails but patched 
 code work?

yes, see the substitution for the LIBPL macro, which leaves ${prefix} 
unexpanded.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24705
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2015-07-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I don't understand your example. Could you please provide reproducible 
Python code? Or better a patch for Lib/test/test_sysconfig.py?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24705
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24705] sysconfig._parse_makefile doesn't expand ${} vars appearing before $() vars

2015-07-24 Thread Matthias Klose

New submission from Matthias Klose:

LIPL has the value

  ${prefix}/lib/python3.5/config-$(VERSION)$(ABIFLAGS)-x86_64-linux-gnu

and the code relies to substitute parameters from the left to the right, but it 
prefers $() variables. the attached patch substitutes all variables from the 
left to the right.

diff -r d8229c26dd92 Lib/sysconfig.py
--- a/Lib/sysconfig.py  Fri Jul 24 09:05:59 2015 +0300
+++ b/Lib/sysconfig.py  Fri Jul 24 14:04:57 2015 +0200
@@ -260,7 +260,12 @@
 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

--
assignee: doko
components: Library (Lib)
messages: 247272
nosy: doko
priority: normal
severity: normal
status: open
title: sysconfig._parse_makefile doesn't expand ${} vars appearing before $() 
vars
versions: Python 3.5, Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24705
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com