···82 ./2.7.3-dylib.patch
83 ./2.7.3-getpath-exe-extension.patch
84 ./2.7.3-no-libm.patch
85+ ] ++ optionals (!(stdenv.cc.isGNU or false)) [
86+87+ # Patch from http://bugs.python.org/issue1222585 adapted to work with
88+ # `patch -p1' and with a last hunk removed
89+ # Upstream distutils is calling C compiler to compile C++ code, which
90+ # only works for GCC and Apple Clang. This makes distutils to call C++
91+ # compiler when needed.
92+ ./python-2.7-distutils-C++.patch
93+94 ];
9596 preConfigure = ''
···1-{lib, python, buildPythonPackage, isPyPy, gfortran, nose, blas}:
23args:
4···11 disabled = isPyPy;
12 buildInputs = args.buildInputs or [ gfortran nose ];
13 propagatedBuildInputs = args.propagatedBuildInputs or [ passthru.blas ];
0000001415 preConfigure = ''
16 sed -i 's/-faltivec//' numpy/distutils/system_info.py
···1+{lib, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas}:
23args:
4···11 disabled = isPyPy;
12 buildInputs = args.buildInputs or [ gfortran nose ];
13 propagatedBuildInputs = args.propagatedBuildInputs or [ passthru.blas ];
14+15+ patches = lib.optionals isPy27 [
16+ # See cpython 2.7 patches.
17+ # numpy.distutils is used by cython during it's check phase
18+ ./numpy-distutils-C++.patch
19+ ];
2021 preConfigure = ''
22 sed -i 's/-faltivec//' numpy/distutils/system_info.py
+8-1
pkgs/top-level/python-packages.nix
···4172 # For testing
4173 nativeBuildInputs = with self; [ numpy pkgs.ncurses ];
41740000004175 checkPhase = ''
4176 export HOME="$NIX_BUILD_TOP"
4177- ${python.interpreter} runtests.py
04178 '';
41794180 meta = {
···4172 # For testing
4173 nativeBuildInputs = with self; [ numpy pkgs.ncurses ];
41744175+ # cython's testsuite requires npy_isinf to return sign of the infinity, but
4176+ # a C99 conformant is only required to return a non zero value
4177+ patches = [ ../development/python-modules/cython_test.patch ];
4178+4179+ # cython's testsuite is not working very well with libc++
4180+ # We are however optimistic about things outside of testsuite still working
4181 checkPhase = ''
4182 export HOME="$NIX_BUILD_TOP"
4183+ ${python.interpreter} runtests.py \
4184+ ${if stdenv.cc.isClang or false then ''--exclude="(cpdef_extern_func|libcpp_algo)"'' else ""}
4185 '';
41864187 meta = {