Blame 00001-rpath.patch

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