This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doko
Recipients doko
Date 2015-07-24.12:13:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1437739980.61.0.17161588188.issue24705@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-07-24 12:13:00dokosetrecipients: + doko
2015-07-24 12:13:00dokosetmessageid: <1437739980.61.0.17161588188.issue24705@psf.upfronthosting.co.za>
2015-07-24 12:13:00dokolinkissue24705 messages
2015-07-24 12:13:00dokocreate