python3Packages.scikitlearn: patch for numpy 1.20.0

This commit is contained in:
Robert T. McGibbon 2021-02-03 11:04:08 -05:00 committed by Frederik Rietdijk
parent bec66f6b74
commit 69a8b546b6

View file

@ -3,25 +3,38 @@
, buildPythonPackage
, fetchPypi
, fetchpatch
, gfortran, glibcLocales
, numpy, scipy, pytest, pillow
, gfortran
, glibcLocales
, numpy
, scipy
, pytest
, pillow
, cython
, joblib
, llvmPackages
, threadpoolctl
, pythonOlder
}:
buildPythonPackage rec {
pname = "scikit-learn";
version = "0.24.1";
# UnboundLocalError: local variable 'message' referenced before assignment
disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "oDNKGALmTWVgIsO/q1anP71r9LEpg0PzaIryFRgQu98=";
};
patches = [
# This patch fixes compatibility with numpy 1.20. It was merged before 0.24.1 was released,
# but for some reason was not included in the 0.24.1 release tarball.
(fetchpatch {
url = "https://github.com/scikit-learn/scikit-learn/commit/e7ef22c3ba2334cb3b476e95d7c083cf6b48ce56.patch";
sha256 = "174554k1pbf92bj7wgq0xjj16bkib32ailyhwavdxaknh4bd9nmv";
})
];
buildInputs = [
pillow
gfortran