logrotate: enable selinux support
[buildroot-gz.git] / package / python-pyzmq / 0002-replace-compile_and_run-with-compile_and_forget.patch
blob278e939e0e074184ac06683683c5e6bf26590e11
1 detect.py: replace compile_and_run with compile_and_forget
3 This function is only used in setup.py to detect the availability of
4 sys/un.h by compiling and running a small test program. Since we're
5 cross-compiling we can't run the generated program, however if the
6 header is missing the test will fail at the compilation step so
7 running the test in unnecessary.
9 Signed-off-by: Lionel Flandrin <lionel@svkt.org>
10 ---
11 buildutils/detect.py | 16 ++++++++--------
12 setup.py | 4 ++--
13 2 files changed, 10 insertions(+), 10 deletions(-)
15 diff --git a/buildutils/detect.py b/buildutils/detect.py
16 index 7a6c115..9520da7 100644
17 --- a/buildutils/detect.py
18 +++ b/buildutils/detect.py
19 @@ -58,7 +58,7 @@ def test_compilation(cfile, compiler=None, **compiler_attrs):
20 cc.link_executable(objs, efile, extra_preargs=lpreargs)
21 return efile
23 -def compile_and_run(basedir, src, compiler=None, **compiler_attrs):
24 +def compile_and_forget(basedir, src, compiler=None, **compiler_attrs):
25 if not os.path.exists(basedir):
26 os.makedirs(basedir)
27 cfile = pjoin(basedir, os.path.basename(src))
28 @@ -66,16 +66,16 @@ def compile_and_run(basedir, src, compiler=None, **compiler_attrs):
29 try:
30 cc = get_compiler(compiler, **compiler_attrs)
31 efile = test_compilation(cfile, compiler=cc)
32 - patch_lib_paths(efile, cc.library_dirs)
33 - result = Popen(efile, stdout=PIPE, stderr=PIPE)
34 - so, se = result.communicate()
35 - # for py3k:
36 - so = so.decode()
37 - se = se.decode()
38 + # patch_lib_paths(efile, cc.library_dirs)
39 + # result = Popen(efile, stdout=PIPE, stderr=PIPE)
40 + # so, se = result.communicate()
41 + # # for py3k:
42 + # so = so.decode()
43 + # se = se.decode()
44 finally:
45 shutil.rmtree(basedir)
47 - return result.returncode, so, se
48 + return None
51 def detect_zmq(basedir, compiler=None, **compiler_attrs):
52 diff --git a/setup.py b/setup.py
53 index c3a2879..b8b0aaf 100755
54 --- a/setup.py
55 +++ b/setup.py
56 @@ -54,7 +54,7 @@ from buildutils import (
57 info, warn, fatal, debug, line, copy_and_patch_libzmq, localpath,
58 fetch_libzmq, stage_platform_hpp,
59 bundled_version, customize_mingw,
60 - compile_and_run,
61 + compile_and_forget,
62 patch_lib_paths,
65 @@ -327,7 +327,7 @@ class Configure(build_ext):
66 except Exception:
67 pass
68 try:
69 - compile_and_run(self.tempdir,
70 + compile_and_forget(self.tempdir,
71 pjoin('buildutils', 'check_sys_un.c'),
72 **minus_zmq
74 --
75 2.11.0