python: add C++ compiler support for distutils

This should help with builds against clang
This commit is contained in:
Dmitry Kalinkin
2016-10-15 17:51:09 -04:00
parent 80433e7030
commit 095095c479
4 changed files with 299 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
{lib, python, buildPythonPackage, isPyPy, gfortran, nose, blas}:
{lib, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas}:
args:
@@ -12,6 +12,12 @@ in buildPythonPackage (args // rec {
buildInputs = args.buildInputs or [ gfortran nose ];
propagatedBuildInputs = args.propagatedBuildInputs or [ passthru.blas ];
patches = lib.optionals isPy27 [
# See cpython 2.7 patches.
# numpy.distutils is used by cython during it's check phase
./numpy-distutils-C++.patch
];
preConfigure = ''
sed -i 's/-faltivec//' numpy/distutils/system_info.py
'';