Zachary Ware added the comment:

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.

----------
nosy: +zach.ware

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24923>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to