1 detect.py: fix the ZMQ version check to the ZMQ version of the buildroot
3 The setup.py script tries to compile a test C program and runs it, to
4 retrieve a version string for the installed ZMQ library, but if the cross
5 compiler links it together, the result cannot be run on the host, due to
6 different architectures and libraries.
8 And if the host compiler would compile/link it, it would not link with the
9 library version inside buildroot but with the library from the host, possibly returning a wrong version number.
11 Instead of trying to run the compiled test program to get the version
12 dynamically, return the version of the buildroot environment.
14 Signed-off-by: Michael Rommel <rommel@layer-7.net>
16 --- pyzmq-13.0.2/buildutils/detect.py.orig 2013-08-10 00:49:28.242557978 +0200
17 +++ pyzmq-13.0.2/buildutils/detect.py 2013-08-10 00:44:35.197572704 +0200
18 @@ -119,15 +119,17 @@ def detect_zmq(basedir, compiler=None, *
20 efile = test_compilation(cfile, compiler=compiler, **compiler_attrs)
22 - result = Popen(efile, stdout=PIPE, stderr=PIPE)
23 - so, se = result.communicate()
24 + # result = Popen(efile, stdout=PIPE, stderr=PIPE)
25 + # so, se = result.communicate()
29 - if result.returncode:
30 - msg = "Error running version detection script:\n%s\n%s" % (so,se)
35 + #if result.returncode:
36 + # msg = "Error running version detection script:\n%s\n%s" % (so,se)
37 + # logging.error(msg)
38 + # raise IOError(msg)
40 + so = "vers: ##ZEROMQ_VERSION##"
42 handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))}