churchyard / rpms / python3

Forked from rpms/python3 6 years ago
Clone

Blame 00001-rpath.patch

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