Blame SOURCES/00001-rpath.patch

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