1{ stdenv, buildPythonPackage, fetchpatch, fetchPypi, python
2, nose, pillow
3, gfortran, glibcLocales
4, numpy, scipy
5}:
6
7buildPythonPackage rec {
8 pname = "scikit-learn";
9 version = "0.19.0";
10 name = "${pname}-${version}";
11 disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "07q261l9145c9xr8b4pcsa08ih1ifhclp05i4xwg43cyamkwpx94";
16 };
17
18 buildInputs = [ nose pillow gfortran glibcLocales ];
19 propagatedBuildInputs = [ numpy scipy numpy.blas ];
20
21 LC_ALL="en_US.UTF-8";
22
23 checkPhase = ''
24 HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests $out/${python.sitePackages}/sklearn/
25 '';
26
27 meta = with stdenv.lib; {
28 description = "A set of python modules for machine learning and data mining";
29 homepage = http://scikit-learn.org;
30 license = licenses.bsd3;
31 maintainers = with maintainers; [ fridh ];
32 };
33}