Skip to content

Commit

Permalink
Merge pull request #49888 from timokau/numpy-high-cpu-fix
Browse files Browse the repository at this point in the history
numpy: fix high cpu count bug
  • Loading branch information
timokau authored Nov 8, 2018
2 parents 50a6f21 + 0d2483f commit 56090c4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkgs/development/python-modules/numpy/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchPypi, python, buildPythonPackage, isPyPy, gfortran, pytest, blas }:
{ stdenv, lib, fetchPypi, fetchpatch, python, buildPythonPackage, isPyPy, gfortran, pytest, blas }:

buildPythonPackage rec {
pname = "numpy";
Expand All @@ -14,7 +14,14 @@ buildPythonPackage rec {
nativeBuildInputs = [ gfortran pytest ];
buildInputs = [ blas ];

patches = lib.optionals (python.hasDistutilsCxxPatch or false) [
patches = [
# fix a bug with high cpu count (https://github.com/numpy/numpy/issues/12087)
(fetchpatch {
name = "limit-default-for-get_num_build_jobs-to-8.patch";
url = "https://github.com/numpy/numpy/commit/4c05fed01c68a305abf62135695bc61606746683.patch";
sha256 = "1j2jlaibbx1fjszxzkgxrz7k8id34kg3gbc2fh4ib6y7hfnbqqz5";
})
] ++ lib.optionals (python.hasDistutilsCxxPatch or false) [
# We patch cpython/distutils to fix https://bugs.python.org/issue1222585
# Patching of numpy.distutils is needed to prevent it from undoing the
# patch to distutils.
Expand Down

0 comments on commit 56090c4

Please sign in to comment.