Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 36 lines 1.1 kB view raw
1{ stdenv, buildPythonPackage, fetchPypi, python 2, gfortran, glibcLocales 3, numpy, scipy, pytest, pillow 4}: 5 6buildPythonPackage rec { 7 pname = "scikit-learn"; 8 version = "0.20.2"; 9 # UnboundLocalError: local variable 'message' referenced before assignment 10 disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534 11 12 src = fetchPypi { 13 inherit pname version; 14 sha256 = "1ri9kx0yrn85h6ivkaja35afbyhimxn8lsairgns2wi5xv3wfnxw"; 15 }; 16 17 buildInputs = [ pillow gfortran glibcLocales ]; 18 propagatedBuildInputs = [ numpy scipy numpy.blas ]; 19 checkInputs = [ pytest ]; 20 21 LC_ALL="en_US.UTF-8"; 22 23 doCheck = !stdenv.isAarch64; 24 # Skip test_feature_importance_regression - does web fetch 25 checkPhase = '' 26 cd $TMPDIR 27 HOME=$TMPDIR OMP_NUM_THREADS=1 pytest -k "not test_feature_importance_regression" --pyargs sklearn 28 ''; 29 30 meta = with stdenv.lib; { 31 description = "A set of python modules for machine learning and data mining"; 32 homepage = http://scikit-learn.org; 33 license = licenses.bsd3; 34 maintainers = with maintainers; [ ]; 35 }; 36}