···8282 ./2.7.3-dylib.patch
8383 ./2.7.3-getpath-exe-extension.patch
8484 ./2.7.3-no-libm.patch
8585+ ] ++ optionals (!(stdenv.cc.isGNU or false)) [
8686+8787+ # Patch from http://bugs.python.org/issue1222585 adapted to work with
8888+ # `patch -p1' and with a last hunk removed
8989+ # Upstream distutils is calling C compiler to compile C++ code, which
9090+ # only works for GCC and Apple Clang. This makes distutils to call C++
9191+ # compiler when needed.
9292+ ./python-2.7-distutils-C++.patch
9393+8594 ];
86958796 preConfigure = ''
···11-{lib, python, buildPythonPackage, isPyPy, gfortran, nose, blas}:
11+{lib, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas}:
2233args:
44···1111 disabled = isPyPy;
1212 buildInputs = args.buildInputs or [ gfortran nose ];
1313 propagatedBuildInputs = args.propagatedBuildInputs or [ passthru.blas ];
1414+1515+ patches = lib.optionals isPy27 [
1616+ # See cpython 2.7 patches.
1717+ # numpy.distutils is used by cython during it's check phase
1818+ ./numpy-distutils-C++.patch
1919+ ];
14201521 preConfigure = ''
1622 sed -i 's/-faltivec//' numpy/distutils/system_info.py
+8-1
pkgs/top-level/python-packages.nix
···41724172 # For testing
41734173 nativeBuildInputs = with self; [ numpy pkgs.ncurses ];
4174417441754175+ # cython's testsuite requires npy_isinf to return sign of the infinity, but
41764176+ # a C99 conformant is only required to return a non zero value
41774177+ patches = [ ../development/python-modules/cython_test.patch ];
41784178+41794179+ # cython's testsuite is not working very well with libc++
41804180+ # We are however optimistic about things outside of testsuite still working
41754181 checkPhase = ''
41764182 export HOME="$NIX_BUILD_TOP"
41774177- ${python.interpreter} runtests.py
41834183+ ${python.interpreter} runtests.py \
41844184+ ${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""}
41784185 '';
4179418641804187 meta = {