churchyard / rpms / python2

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