churchyard / rpms / python3

Forked from rpms/python3 4 years ago
Clone

Blame 00001-rpath.patch

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