diff options
author | Fedora Python maintainers <python-devel@lists.fedoraproject.org> | 2020-07-15 15:18:01 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2020-09-29 15:31:51 +0200 |
commit | 996f8b4c275bb89513d326cac50f50a78ab4d58c (patch) | |
tree | 730f0936388acd2628eae56696dcc57ae2329d2b | |
parent | 953edca048fe3bc9bcdc0a45ae93d81672b94382 (diff) | |
download | cpython-git-996f8b4c275bb89513d326cac50f50a78ab4d58c.tar.gz |
python-2.6.4-distutils-rpath.patch
00017 #
Fixup distutils/unixccompiler.py to remove standard library path from rpath:
Adapted from Patch0 in ivazquez' python3000 specfile, removing usage of
super() as it's an old-style class
-rw-r--r-- | Lib/distutils/unixccompiler.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 3af540e581..1c9cfe89a2 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -85,6 +85,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): |