The current CVS (Feb 16) version of 2.1a2 has in setup.py the following:
def detect_modules(self):
# Ensure that /usr/local is always used
if '/usr/local/lib' not in self.compiler.library_dirs:
self.compiler.library_dirs.append('/usr/local/lib')
if '/usr/local/include' not in self.compiler.include_dirs:
self.compiler.include_dirs.append( '/usr/local/include' )
# lib_dirs and inc_dirs are used to search for files;
# if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed.
lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
inc_dirs = ['/usr/include'] + self.compiler.include_dirs
Naively, it seems to me that the lib_dirs line should read:
inc_dirs = self.compiler.include_dirs + ['/usr/include']
so that /usr/local is searched during the compile/link phases before the standard system locations. Otherwise, a module could "include" files from /usr/include and link against library files from /usr/local/lib if a an earlier version of some software package was bundled with the OS (and was in /usr/include, /usr/lib) and a later version had been installed in /usr/local/{include, lib}.
|