2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, python
|
2017-06-05 22:04:28 +01:00
|
|
|
, nose, pillow
|
|
|
|
, gfortran, glibcLocales
|
|
|
|
, numpy, scipy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scikit-learn";
|
2018-07-22 11:20:23 +01:00
|
|
|
version = "0.19.2";
|
2018-07-26 12:58:58 +01:00
|
|
|
# UnboundLocalError: local variable 'message' referenced before assignment
|
2018-07-29 09:44:20 +01:00
|
|
|
doCheck = false;
|
|
|
|
disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534
|
2017-06-05 22:04:28 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-22 11:20:23 +01:00
|
|
|
sha256 = "b276739a5f863ccacb61999a3067d0895ee291c95502929b2ae56ea1f882e888";
|
2017-06-05 22:04:28 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ nose pillow gfortran glibcLocales ];
|
|
|
|
propagatedBuildInputs = [ numpy scipy numpy.blas ];
|
|
|
|
|
|
|
|
LC_ALL="en_US.UTF-8";
|
|
|
|
|
2018-01-16 20:31:51 +00:00
|
|
|
# Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213
|
2018-03-17 18:35:03 +00:00
|
|
|
# Disable doctests everywhere: https://github.com/NixOS/nixpkgs/issues/35436
|
2017-06-05 22:04:28 +01:00
|
|
|
checkPhase = ''
|
2018-03-17 18:35:03 +00:00
|
|
|
HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests --doctest-options=+SKIP $out/${python.sitePackages}/sklearn/
|
2017-06-05 22:04:28 +01:00
|
|
|
'';
|
|
|
|
|
2018-07-26 12:58:58 +01:00
|
|
|
|
|
|
|
|
2017-06-05 22:04:28 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A set of python modules for machine learning and data mining";
|
|
|
|
homepage = http://scikit-learn.org;
|
|
|
|
license = licenses.bsd3;
|
2018-07-26 12:58:58 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-06-05 22:04:28 +01:00
|
|
|
};
|
|
|
|
}
|