2017-06-05 23:04:28 +02:00
|
|
|
{ stdenv, buildPythonPackage, fetchpatch, fetchPypi, python
|
|
|
|
, nose, pillow
|
|
|
|
, gfortran, glibcLocales
|
|
|
|
, numpy, scipy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scikit-learn";
|
2017-10-25 20:04:35 +02:00
|
|
|
version = "0.19.1";
|
2017-06-05 23:04:28 +02:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2017-10-25 20:04:35 +02:00
|
|
|
sha256 = "5ca0ad32ee04abe0d4ba02c8d89d501b4e5e0304bdf4d45c2e9875a735b323a0";
|
2017-06-05 23:04:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ nose pillow gfortran glibcLocales ];
|
|
|
|
propagatedBuildInputs = [ numpy scipy numpy.blas ];
|
|
|
|
|
|
|
|
LC_ALL="en_US.UTF-8";
|
|
|
|
|
2018-01-16 21:31:51 +01:00
|
|
|
# Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213
|
2017-06-05 23:04:28 +02:00
|
|
|
checkPhase = ''
|
2018-01-16 21:31:51 +01:00
|
|
|
HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests ${stdenv.lib.optionalString stdenv.isDarwin "--doctest-options=+SKIP"} $out/${python.sitePackages}/sklearn/
|
2017-06-05 23:04:28 +02: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;
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
|
|
|
};
|
|
|
|
}
|