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 zach.ware
Recipients christopher.hogan, zach.ware
Date 2016-01-19.21:50:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453240231.8.0.502514725073.issue24923@psf.upfronthosting.co.za>
In-reply-to
Content
I've been doing some research on this, the below is pretty much a brain-dump.

Related issues: issue232609, issue420565, issue10520.

This looks to me like the ideal solution is to assign a priority to each entry and sort by that priority before using it; give system locations low priority, /usr/local (sys.prefix) locations slightly higher priority, and user-defined paths highest priority.  That may be far more complex than it's worth, though.

It looks like setup.py doesn't actually look at CFLAGS at all, just CPPFLAGS and LDFLAGS.

Chris, is the behavior of 3.x any better for you?  There are some differences between the 2.7 and 3.x implementations of add_dir_to_list (most obviously, relative paths are always kept at the front of the list; see issue10520).

The naive solution looks to me to be to just move the CPPFLAGS/LDFLAGS checking further down detect_modules(), past all other calls to add_dir_to_list.  A test build with that change seems to work for me, but I'm not familiar enough with setup.py and how it works to call it correct.
History
Date User Action Args
2016-01-19 21:50:31zach.waresetrecipients: + zach.ware, christopher.hogan
2016-01-19 21:50:31zach.waresetmessageid: <1453240231.8.0.502514725073.issue24923@psf.upfronthosting.co.za>
2016-01-19 21:50:31zach.warelinkissue24923 messages
2016-01-19 21:50:31zach.warecreate