diff options
author | Fedora Python maintainers <python-devel@lists.fedoraproject.org> | 2020-07-15 15:42:17 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2020-09-29 15:59:05 +0200 |
commit | b3cc16dc830a688b3e12271fd34f7dd458e2af43 (patch) | |
tree | 35a4b943e4794c0bf414b7b396b4070fb60b5c49 | |
parent | c1d2c7c30997babf718f3fcca688e07a7ce86c18 (diff) | |
download | cpython-git-b3cc16dc830a688b3e12271fd34f7dd458e2af43.tar.gz |
00187-add-RPATH-to-pyexpat.patch
00187 #
Add an explicit RPATH to pyexpat.so pointing at the directory
containing the system expat (which has the extra XML_SetHashSalt
symbol), to avoid an ImportError with a link error if there's an
LD_LIBRARY_PATH containing a "vanilla" build of expat (without the
symbol)
-rw-r--r-- | setup.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1536,12 +1536,21 @@ class PyBuildExt(build_ext): 'expat/xmltok_impl.h' ] + # Add an explicit RPATH to pyexpat.so pointing at the directory + # containing the system expat (which has the extra XML_SetHashSalt + # symbol), to avoid an ImportError with a link error if there's an + # LD_LIBRARY_PATH containing a "vanilla" build of expat (without the + # symbol) (rhbz#833271): + EXPAT_RPATH = '/usr/lib64' if sys.maxint == 0x7fffffffffffffff else '/usr/lib' + + exts.append(Extension('pyexpat', define_macros = define_macros, include_dirs = expat_inc, libraries = expat_lib, sources = ['pyexpat.c'] + expat_sources, depends = expat_depends, + extra_link_args = ['-Wl,-rpath,%s' % EXPAT_RPATH] )) # Fredrik Lundh's cElementTree module. Note that this also |