diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-28 19:28:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-28 19:29:13 +0300 |
commit | c70eb30240f8b5d5a8f2ac509f0eb585936142b5 (patch) | |
tree | 99220555b77c180216f95cf5da68a87136eae050 /build_files/build_environment/patches | |
parent | 19c65cd6e2a61a4eec4aa8ea11128a4675aa34b1 (diff) |
Build environment: Make sure Python is linkign against static Zlib
There is system-wide libz development package installed by default,
needed for some other dependencies. This patch ensures Python will
use our own self-compiled Zlib.
Diffstat (limited to 'build_files/build_environment/patches')
-rw-r--r-- | build_files/build_environment/patches/python_linux.diff | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build_files/build_environment/patches/python_linux.diff b/build_files/build_environment/patches/python_linux.diff new file mode 100644 index 00000000000..3c65e12111f --- /dev/null +++ b/build_files/build_environment/patches/python_linux.diff @@ -0,0 +1,29 @@ +diff --git a/setup.py.orig b/setup.py +index a97a755..ee2bfad 100644 +--- a/setup.py.orig ++++ b/setup.py +@@ -1422,13 +1422,13 @@ class PyBuildExt(build_ext): + version = line.split()[2] + break + if version >= version_req: +- if (self.compiler.find_library_file(lib_dirs, 'z')): ++ if (self.compiler.find_library_file(lib_dirs, 'z_pic')): + if host_platform == "darwin": + zlib_extra_link_args = ('-Wl,-search_paths_first',) + else: + zlib_extra_link_args = () + exts.append( Extension('zlib', ['zlibmodule.c'], +- libraries = ['z'], ++ libraries = ['z_pic'], + extra_link_args = zlib_extra_link_args)) + have_zlib = True + else: +@@ -1442,7 +1442,7 @@ class PyBuildExt(build_ext): + # crc32 if we have it. Otherwise binascii uses its own. + if have_zlib: + extra_compile_args = ['-DUSE_ZLIB_CRC32'] +- libraries = ['z'] ++ libraries = ['z_pic'] + extra_link_args = zlib_extra_link_args + else: + extra_compile_args = [] |