From c06aa42f7c1a0d22a3c816adacc25bb0b12d0179 Mon Sep 17 00:00:00 2001 From: Lionel Flandrin Date: Tue, 31 Jan 2017 12:22:45 +0100 Subject: python-pyzmq: bump to version 16.0.2 Updated the zmq version detection patch to apply cleanly on 16.0.2. Added patch #2 to replace compile_and_run with compile_and_forget in the setup code: this function is only used to check for the availability of "sys/un.h" and we only need to compile the test code to make sure of that. This fixes the cross-compilation. Signed-off-by: Lionel Flandrin Reviewed-by: Yegor Yefremov Signed-off-by: Thomas Petazzoni --- ...e-compile_and_run-with-compile_and_forget.patch | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 package/python-pyzmq/0002-replace-compile_and_run-with-compile_and_forget.patch (limited to 'package/python-pyzmq/0002-replace-compile_and_run-with-compile_and_forget.patch') diff --git a/package/python-pyzmq/0002-replace-compile_and_run-with-compile_and_forget.patch b/package/python-pyzmq/0002-replace-compile_and_run-with-compile_and_forget.patch new file mode 100644 index 0000000000..278e939e0e --- /dev/null +++ b/package/python-pyzmq/0002-replace-compile_and_run-with-compile_and_forget.patch @@ -0,0 +1,76 @@ +detect.py: replace compile_and_run with compile_and_forget + +This function is only used in setup.py to detect the availability of +sys/un.h by compiling and running a small test program. Since we're +cross-compiling we can't run the generated program, however if the +header is missing the test will fail at the compilation step so +running the test in unnecessary. + +Signed-off-by: Lionel Flandrin +--- + buildutils/detect.py | 16 ++++++++-------- + setup.py | 4 ++-- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/buildutils/detect.py b/buildutils/detect.py +index 7a6c115..9520da7 100644 +--- a/buildutils/detect.py ++++ b/buildutils/detect.py +@@ -58,7 +58,7 @@ def test_compilation(cfile, compiler=None, **compiler_attrs): + cc.link_executable(objs, efile, extra_preargs=lpreargs) + return efile + +-def compile_and_run(basedir, src, compiler=None, **compiler_attrs): ++def compile_and_forget(basedir, src, compiler=None, **compiler_attrs): + if not os.path.exists(basedir): + os.makedirs(basedir) + cfile = pjoin(basedir, os.path.basename(src)) +@@ -66,16 +66,16 @@ def compile_and_run(basedir, src, compiler=None, **compiler_attrs): + try: + cc = get_compiler(compiler, **compiler_attrs) + efile = test_compilation(cfile, compiler=cc) +- patch_lib_paths(efile, cc.library_dirs) +- result = Popen(efile, stdout=PIPE, stderr=PIPE) +- so, se = result.communicate() +- # for py3k: +- so = so.decode() +- se = se.decode() ++ # patch_lib_paths(efile, cc.library_dirs) ++ # result = Popen(efile, stdout=PIPE, stderr=PIPE) ++ # so, se = result.communicate() ++ # # for py3k: ++ # so = so.decode() ++ # se = se.decode() + finally: + shutil.rmtree(basedir) + +- return result.returncode, so, se ++ return None + + + def detect_zmq(basedir, compiler=None, **compiler_attrs): +diff --git a/setup.py b/setup.py +index c3a2879..b8b0aaf 100755 +--- a/setup.py ++++ b/setup.py +@@ -54,7 +54,7 @@ from buildutils import ( + info, warn, fatal, debug, line, copy_and_patch_libzmq, localpath, + fetch_libzmq, stage_platform_hpp, + bundled_version, customize_mingw, +- compile_and_run, ++ compile_and_forget, + patch_lib_paths, + ) + +@@ -327,7 +327,7 @@ class Configure(build_ext): + except Exception: + pass + try: +- compile_and_run(self.tempdir, ++ compile_and_forget(self.tempdir, + pjoin('buildutils', 'check_sys_un.c'), + **minus_zmq + ) +-- +2.11.0 + -- cgit v1.2.3