mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Tidy up the ordering of include and library directories, putting
/usr/local first and leaving /usr/include at the end. This addresses the comments in bug #232609.
This commit is contained in:
parent
84e87f379e
commit
9b5abcd48c
1 changed files with 4 additions and 4 deletions
6
setup.py
6
setup.py
|
@ -146,15 +146,15 @@ class PyBuildExt(build_ext):
|
||||||
def detect_modules(self):
|
def detect_modules(self):
|
||||||
# Ensure that /usr/local is always used
|
# Ensure that /usr/local is always used
|
||||||
if '/usr/local/lib' not in self.compiler.library_dirs:
|
if '/usr/local/lib' not in self.compiler.library_dirs:
|
||||||
self.compiler.library_dirs.append('/usr/local/lib')
|
self.compiler.library_dirs.insert(0, '/usr/local/lib')
|
||||||
if '/usr/local/include' not in self.compiler.include_dirs:
|
if '/usr/local/include' not in self.compiler.include_dirs:
|
||||||
self.compiler.include_dirs.append( '/usr/local/include' )
|
self.compiler.include_dirs.insert(0, '/usr/local/include' )
|
||||||
|
|
||||||
# lib_dirs and inc_dirs are used to search for files;
|
# lib_dirs and inc_dirs are used to search for files;
|
||||||
# if a file is found in one of those directories, it can
|
# if a file is found in one of those directories, it can
|
||||||
# be assumed that no additional -I,-L directives are needed.
|
# be assumed that no additional -I,-L directives are needed.
|
||||||
lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
|
lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
|
||||||
inc_dirs = ['/usr/include'] + self.compiler.include_dirs
|
inc_dirs = self.compiler.include_dirs + ['/usr/include']
|
||||||
exts = []
|
exts = []
|
||||||
|
|
||||||
platform = self.get_platform()
|
platform = self.get_platform()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue