1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/scikitlearn/default.nix
Maximilian Bosch af17bfdedf pythonPackages.scikitlearn: apply max_iter patch from scikitlearn master (#43483)
See https://github.com/scikit-learn/scikit-learn/pull/10723

This fixes the build of `scikitlearn` on master and nixos-unstable.

The issue is originally an upstream issue
(see https://github.com/scikit-learn/scikit-learn/issues/10619) which
was fixed on master and was mainly caused by changes to the environment.

Closes #43466
2018-07-14 13:20:37 +02:00

39 lines
1.2 KiB
Nix

{ stdenv, buildPythonPackage, fetchpatch, fetchPypi, python
, nose, pillow
, gfortran, glibcLocales
, numpy, scipy
}:
buildPythonPackage rec {
pname = "scikit-learn";
version = "0.19.1";
disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534
src = fetchPypi {
inherit pname version;
sha256 = "5ca0ad32ee04abe0d4ba02c8d89d501b4e5e0304bdf4d45c2e9875a735b323a0";
};
# basically https://github.com/scikit-learn/scikit-learn/pull/10723,
# but rebased onto 0.19.1
patches = [ ./n_iter-should-be-less-than-max_iter-using-lbgfs.patch ];
buildInputs = [ nose pillow gfortran glibcLocales ];
propagatedBuildInputs = [ numpy scipy numpy.blas ];
LC_ALL="en_US.UTF-8";
# Disable doctests on OSX: https://github.com/scikit-learn/scikit-learn/issues/10213
# Disable doctests everywhere: https://github.com/NixOS/nixpkgs/issues/35436
checkPhase = ''
HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests --doctest-options=+SKIP $out/${python.sitePackages}/sklearn/
'';
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 ];
};
}