Blame SOURCES/00001-rpath.patch

900f19
diff -up Python-3.1.1/Lib/distutils/unixccompiler.py.rpath Python-3.1.1/Lib/distutils/unixccompiler.py
900f19
--- Python-3.1.1/Lib/distutils/unixccompiler.py.rpath	2009-09-04 17:29:34.000000000 -0400
900f19
+++ Python-3.1.1/Lib/distutils/unixccompiler.py	2009-09-04 17:49:54.000000000 -0400
900f19
@@ -141,6 +141,15 @@ class UnixCCompiler(CCompiler):
900f19
     if sys.platform == "cygwin":
900f19
         exe_extension = ".exe"
900f19
 
900f19
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
900f19
+        """Remove standard library path from rpath"""
900f19
+        libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
900f19
+            libraries, library_dirs, runtime_library_dirs)
900f19
+        libdir = sysconfig.get_config_var('LIBDIR')
900f19
+        if runtime_library_dirs and (libdir in runtime_library_dirs):
900f19
+            runtime_library_dirs.remove(libdir)
900f19
+        return libraries, library_dirs, runtime_library_dirs
900f19
+
900f19
     def preprocess(self, source, output_file=None, macros=None,
900f19
                    include_dirs=None, extra_preargs=None, extra_postargs=None):
900f19
         fixed_args = self._fix_compile_args(None, macros, include_dirs)