churchyard / rpms / python38

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