Blame SOURCES/00001-rpath.patch

d71d1f
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d71d1f
From: David Malcolm <dmalcolm@redhat.com>
d71d1f
Date: Wed, 13 Jan 2010 21:25:18 +0000
d71d1f
Subject: [PATCH] 00001: Fixup distutils/unixccompiler.py to remove standard
d71d1f
 library path from rpath Was Patch0 in ivazquez' python3000 specfile
d71d1f
d71d1f
---
d71d1f
 Lib/distutils/unixccompiler.py | 9 +++++++++
d71d1f
 1 file changed, 9 insertions(+)
d71d1f
d71d1f
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
d71d1f
index f0792de74a..4d837936c6 100644
d71d1f
--- a/Lib/distutils/unixccompiler.py
d71d1f
+++ b/Lib/distutils/unixccompiler.py
d71d1f
@@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler):
d71d1f
     if sys.platform == "cygwin":
d71d1f
         exe_extension = ".exe"
d71d1f
 
d71d1f
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
d71d1f
+        """Remove standard library path from rpath"""
d71d1f
+        libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
d71d1f
+            libraries, library_dirs, runtime_library_dirs)
d71d1f
+        libdir = sysconfig.get_config_var('LIBDIR')
d71d1f
+        if runtime_library_dirs and (libdir in runtime_library_dirs):
d71d1f
+            runtime_library_dirs.remove(libdir)
d71d1f
+        return libraries, library_dirs, runtime_library_dirs
d71d1f
+
d71d1f
     def preprocess(self, source, output_file=None, macros=None,
d71d1f
                    include_dirs=None, extra_preargs=None, extra_postargs=None):
d71d1f
         fixed_args = self._fix_compile_args(None, macros, include_dirs)