Issue 1675533: setup.py LDFLAGS regexp is wrong (original) (raw)

Created on 2007-03-07 08:45 by cgaspar, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg31458 - (view) Author: Carson Gaspar (cgaspar) Date: 2007-03-07 08:45
Python 2.5 setup.py mangles LDFLAGS and CPPFLAGS via: env_val = re.sub(r'(^|\s+)-(- (?!%s))' % arg_name[1], '', env_val) This causes '-L/path/to/foo -R/path/to/bar' to become '-L/path/to/fooR/path/to/bar', which obviously doesn't work. The fix is simple - eat non-whitespace after the unrecognized option: env_val = re.sub(r'(^ \s+)-(-
msg31459 - (view) Author: Carson Gaspar (cgaspar) Date: 2007-03-07 08:48
Or I could get the regexp correct and eat _option_ non-whitespace... env_val = re.sub(r'(^|\s+)-(- (?!%s))\S*' % arg_name[1], '', env_val)
msg60177 - (view) Author: John Rowland Lenton (Chipaca) * Date: 2008-01-19 14:46
This was fixed in r57389 by georg.brandl by changing the replacement string '' to ' ' (turning the option into a non-option). Steps to reproduce this on Ubuntu Feisty, before that revision, were: $ mkdir banana $ sudo mv /usr/include/sqlite3.h banana/ $ make clean && ./configure && make [...] Failed to find the necessary bits to build these modules: _sqlite3 bsddb185 sunaudiodev [...] $ make clean && CPPFLAGS=-Ibanana ./configure && make Failed to find the necessary bits to build these modules: bsddb185 sunaudiodev $ make clean && CPPFLAGS=-Ibanana\ -Rmango ./configure && make Failed to find the necessary bits to build these modules: _sqlite3 bsddb185 sunaudiodev
msg60184 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-01-19 15:32
Yes, not it works ok! Thanks John for the testing example, and Carson for the report.
msg60185 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-01-19 15:34
Bloody fingers. I meant that *now" it works ok.
History
Date User Action Args
2022-04-11 14:56:23 admin set github: 44676
2008-01-19 15:34:10 facundobatista set messages: +
2008-01-19 15:32:24 facundobatista set status: open -> closedresolution: out of datemessages: + nosy: + facundobatista
2008-01-19 14:46:04 Chipaca set nosy: + Chipacamessages: +
2008-01-12 00:57:34 akuchling set keywords: + easy
2007-03-07 08:45:06 cgaspar create