From 4d3741ed45e9e501eb5185b690ef8a52b7ffafa8 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Thu, 24 May 2012 17:16:07 +0200 Subject: [PATCH] Python: add patch to remove rpath Signed-off-by: Stephan Raue --- .../Python-2.7.3-009-distutils-rpath.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch diff --git a/packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch b/packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch new file mode 100644 index 0000000000..f1565076c5 --- /dev/null +++ b/packages/lang/Python/patches/Python-2.7.3-009-distutils-rpath.patch @@ -0,0 +1,20 @@ +diff -up Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath Python-2.6.4/Lib/distutils/unixccompiler.py +--- Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath 2009-09-09 04:34:06.000000000 -0400 ++++ Python-2.6.4/Lib/distutils/unixccompiler.py 2010-03-15 21:33:25.000000000 -0400 +@@ -142,6 +142,16 @@ class UnixCCompiler(CCompiler): + if sys.platform == "cygwin": + exe_extension = ".exe" + ++ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): ++ """Remove standard library path from rpath""" ++ libraries, library_dirs, runtime_library_dirs = \ ++ CCompiler._fix_lib_args(self, libraries, library_dirs, ++ runtime_library_dirs) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if runtime_library_dirs and (libdir in runtime_library_dirs): ++ runtime_library_dirs.remove(libdir) ++ return libraries, library_dirs, runtime_library_dirs ++ + def preprocess(self, source, + output_file=None, macros=None, include_dirs=None, + extra_preargs=None, extra_postargs=None):