Blame SOURCES/00001-rpath.patch

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