Blame SOURCES/00001-rpath.patch

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