xref: /trunk/main/python/python-3.11.15-selfcontained.patch (revision 30d2e6beba5b3cdbcaf7208028ffe084e446bfd6)
1--- misc/build/Python-3.11.15/setup.py
2+++ misc/build/Python-3.11.15/setup.py
3@@ -844,12 +844,8 @@
4                         add_dir_to_list(dir_list, directory)
5
6     def configure_compiler(self):
7-        # Ensure that /usr/local is always used, but the local build
8-        # directories (i.e. '.' and 'Include') must be first.  See issue
9-        # 10520.
10-        if not CROSS_COMPILING:
11-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
12-            add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
13+        # Do not search /usr/local: libraries installed there on the build
14+        # machine must not leak into the bundled interpreter.
15         # only change this for cross builds for 3.3, issues on Mageia
16         if CROSS_COMPILING:
17             self.add_cross_compiling_paths()
18--- misc/build/Python-3.11.15/Modules/Setup.local
19+++ misc/build/Python-3.11.15/Modules/Setup.local
20@@ -0,0 +1,3 @@
21+# AOO: do not build modules that need libraries from the build machine or SDK.
22+*disabled*
23+readline _curses _curses_panel _sqlite3 _bz2 _lzma _gdbm _dbm _tkinter _uuid nis
24