Blame SOURCES/python-2.6.4-distutils-rpath.patch

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