summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-06-05 22:04:28 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-06-05 22:05:43 +0100
commitcf2c5f1be9443323893efd8e71345d54e67ec29f (patch)
tree81b6c8ce9e861e51f5f615c16a802975681e3591 /pkgs/development/python-modules
parentdac3cf5a4aa53a3952d2b7d3ae9a4c106bf14af9 (diff)
downloadnixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.tar
nixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.tar.gz
nixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.tar.bz2
nixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.tar.lz
nixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.tar.xz
nixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.tar.zst
nixpkgs-cf2c5f1be9443323893efd8e71345d54e67ec29f.zip
python.pkgs.scikitlearn: fix python 3.6 tests
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/scikitlearn/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/scikitlearn/default.nix b/pkgs/development/python-modules/scikitlearn/default.nix
new file mode 100644
index 00000000000..6ac787bc82b
--- /dev/null
+++ b/pkgs/development/python-modules/scikitlearn/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, buildPythonPackage, fetchpatch, fetchPypi, python
+, nose, pillow
+, gfortran, glibcLocales
+, numpy, scipy
+}:
+
+buildPythonPackage rec {
+  pname = "scikit-learn";
+  version = "0.18.1";
+  name = "${pname}-${version}";
+  disabled = stdenv.isi686;  # https://github.com/scikit-learn/scikit-learn/issues/5534
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1eddfc27bb37597a5d514de1299981758e660e0af56981c0bfdf462c9568a60c";
+  };
+
+  patches = [
+    # python 3.6 test fixes (will be part of 0.18.2)
+    (fetchpatch {
+       url = https://github.com/scikit-learn/scikit-learn/pull/8123/commits/b77f28a7163cb4909da1b310f1fb741bee3cabfe.patch;
+       sha256 = "1rp6kr6hiabb6s0vh7mkgr10qwrqlq3z1fhpi0s011hg434ckh19";
+     })
+  ];
+
+  buildInputs = [ nose pillow gfortran glibcLocales ];
+  propagatedBuildInputs = [ numpy scipy numpy.blas ];
+
+  LC_ALL="en_US.UTF-8";
+
+  checkPhase = ''
+    HOME=$TMPDIR OMP_NUM_THREADS=1 nosetests $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 ];
+  };
+}