churchyard / rpms / python2

Forked from rpms/python2 6 years ago
Clone
f5df1f8
diff -up Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath Python-2.6.4/Lib/distutils/unixccompiler.py
f5df1f8
--- Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath	2009-09-09 04:34:06.000000000 -0400
f5df1f8
+++ Python-2.6.4/Lib/distutils/unixccompiler.py	2010-03-15 21:33:25.000000000 -0400
f5df1f8
@@ -142,6 +142,16 @@ class UnixCCompiler(CCompiler):
f5df1f8
     if sys.platform == "cygwin":
f5df1f8
         exe_extension = ".exe"
f5df1f8
 
f5df1f8
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
f5df1f8
+        """Remove standard library path from rpath"""
f5df1f8
+        libraries, library_dirs, runtime_library_dirs = \
f5df1f8
+            CCompiler._fix_lib_args(self, libraries, library_dirs,
f5df1f8
+                                    runtime_library_dirs)
f5df1f8
+        libdir = sysconfig.get_config_var('LIBDIR')
f5df1f8
+        if runtime_library_dirs and (libdir in runtime_library_dirs):
f5df1f8
+            runtime_library_dirs.remove(libdir)
f5df1f8
+        return libraries, library_dirs, runtime_library_dirs
f5df1f8
+
f5df1f8
     def preprocess(self, source,
f5df1f8
                    output_file=None, macros=None, include_dirs=None,
f5df1f8
                    extra_preargs=None, extra_postargs=None):