--- Python-3.11.2.old/setup.py +++ Python-3.11.2/setup.py @@ -868,8 +868,36 @@ add_dir_to_list(self.compiler.include_dirs, sysconfig.get_config_var("INCLUDEDIR")) - system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] - system_include_dirs = ['/usr/include'] + system_lib_dirs = [ + '__META_SYSLIBDIR__' , + '__META_SYSTREE__/lib' , + '__META_SYSTREE__/toolchain/lib' , + + '__META_PRODTREE__/bzip2/lib' , + '__META_PRODTREE__/db/lib' , + '__META_PRODTREE__/gdbm/lib' , + '__META_PRODTREE__/glibc/lib64' , + '__META_PRODTREE__/libffi/lib' , + '__META_PRODTREE__/openssl/lib' , + '__META_PRODTREE__/ncurses/lib' , + '__META_PRODTREE__/readline/lib' , + '__META_PRODTREE__/sqlite3/lib' , + '__META_PRODTREE__/tcltk/lib' , + '__META_PRODTREE__/xzutils/lib' , + '__META_PRODTREE__/zlib/lib' , + ] + + system_include_dirs = [ + '__META_SYSTREE__/include' , + '__META_SYSTREE__/include/ncurses' , + + '__META_PRODTREE__/bzip2/include' , + '__META_PRODTREE__/glibc/include' , + '__META_PRODTREE__/libffi/include' , + '__META_PRODTREE__/openssl/include' , + '__META_PRODTREE__/tcltk/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. @@ -1108,11 +1136,11 @@ elif curses_library: readline_libs.append(curses_library) elif self.compiler.find_library_file(self.lib_dirs + - ['/usr/lib/termcap'], +['__META_PRODTREE__/termcap/lib'], 'termcap'): readline_libs.append('termcap') self.add(Extension('readline', ['readline.c'], - library_dirs=['/usr/lib/termcap'], +library_dirs=['__META_PRODTREE__/termcap/lib'], libraries=readline_libs)) else: self.missing.append('readline')