classification
Title: setup.py trashes LDFLAGS
Type: Stage:
Components: Build Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, h_koenig
Priority: normal Keywords:

Created on 2007-08-01 13:56 by h_koenig, last changed 2007-08-24 11:48 by georg.brandl. This issue is now closed.

Messages (2)
msg32578 - (view) Author: Harald Koenig (h_koenig) Date: 2007-08-01 13:56
the regexp below will trash the library path in this line in Makefile

    LDFLAGS = -L/foo/lib -Wl,-rpath,/foo/lib -L/bar/lib -Wl,-rpath,/bar/lib

to 
    -L/foo/libWl,-rpath,/foo/lib -L/bar/libWl,-rpath,/bar/lib

which renders this library paths broken and useless for  building python modules.


the following patch seems to work fine for my setup on various plattforms:

--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
--- Python-2.5.1/setup.py~      2007-08-01 15:19:27.000000000 +0200
+++ Python-2.5.1/setup.py       2007-08-01 15:19:48.000000000 +0200
@@ -267,7 +267,7 @@
                 # strip out double-dashes first so that we don't end up with
                 # substituting "--Long" to "-Long" and thus lead to "ong" being
                 # used for a library directory.
-                env_val = re.sub(r'(^|\s+)-(-|(?!%s))' % arg_name[1], '', env_val)
+                env_val = re.sub(r'(^|\s+)-(-|(?!%s))' % arg_name[1], ' ', env_val)
                 parser = optparse.OptionParser()
                 # Make sure that allowing args interspersed with options is
                 # allowed
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
msg55251 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-24 11:48
Thanks for the report, fixed in rev. 57389, 57390 (2.5).
History
Date User Action Args
2007-08-24 11:48:50georg.brandlsetstatus: open -> closed
assignee: georg.brandl
resolution: fixed
messages: + msg55251
nosy: + georg.brandl
2007-08-01 13:56:10h_koenigcreate