# DP: Don't include /usr/local/include and /usr/local/lib as gcc search paths Index: python3.2-3.2/setup.py =================================================================== --- python3.2-3.2.orig/setup.py 2010-12-28 10:51:43.000000000 +0100 +++ python3.2-3.2/setup.py 2011-03-25 17:59:16.776545002 +0100 @@ -374,8 +374,9 @@ # Ensure that /usr/local is always used, but the local build # directories (i.e. '.' and 'Include') must be first. See issue # 10520. - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + # On Debian /usr/local is always used, so we don't include it twice + #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') # Add paths specified in the environment variables LDFLAGS and # CPPFLAGS for header and library files. @@ -425,11 +426,14 @@ # 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. + gnu_triplet = os.popen('dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null || dpkg-architecture -qDEB_HOST_GNU_TYPE').readline()[:-1] lib_dirs = self.compiler.library_dirs + [ - '/lib64', '/usr/lib64', + os.path.join('/lib', gnu_triplet), + os.path.join('/usr/lib', gnu_triplet), '/lib', '/usr/lib', ] inc_dirs = self.compiler.include_dirs + ['/usr/include'] + inc_dirs.append(os.path.join('/usr/include', gnu_triplet)) exts = [] missing = []