1{ stdenv, buildPythonPackage, fetchPypi, python 2, nose, pillow 3, gfortran, glibcLocales 4, numpy, scipy 5}: 6 7buildPythonPackage rec { 8 pname = "scikit-learn"; 9 version = "0.19.2"; 10 # UnboundLocalError: local variable 'message' referenced before assignment 11 doCheck = false; 12 disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "b276739a5f863ccacb61999a3067d0895ee291c95502929b2ae56ea1f882e888"; 17 }; 18 19 buildInputs = [ nose pillow gfortran glibcLocales ]; 20 propagatedBuildInputs = [ numpy scipy numpy.blas ]; 21 22 LC_ALL="en_US.UTF-8"; 23 24 # Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213 25 # Disable doctests everywhere: https://github.com/NixOS/nixpkgs/issues/35436 26 checkPhase = '' 27 HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests --doctest-options=+SKIP $out/${python.sitePackages}/sklearn/ 28 ''; 29 30 31 32 meta = with stdenv.lib; { 33 description = "A set of python modules for machine learning and data mining"; 34 homepage = http://scikit-learn.org; 35 license = licenses.bsd3; 36 maintainers = with maintainers; [ ]; 37 }; 38}