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.1";
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 = "5ca0ad32ee04abe0d4ba02c8d89d501b4e5e0304bdf4d45c2e9875a735b323a0";
16 };
17
18 buildInputs = [ nose pillow gfortran glibcLocales ];
19 propagatedBuildInputs = [ numpy scipy numpy.blas ];
20
21 LC_ALL="en_US.UTF-8";
22
23 # Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213
24 checkPhase = ''
25 HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests ${stdenv.lib.optionalString stdenv.isDarwin "--doctest-options=+SKIP"} $out/${python.sitePackages}/sklearn/
26 '';
27
28 meta = with stdenv.lib; {
29 description = "A set of python modules for machine learning and data mining";
30 homepage = http://scikit-learn.org;
31 license = licenses.bsd3;
32 maintainers = with maintainers; [ fridh ];
33 };
34}