From 3936a4835ae97f8e58bc53f32a75b1d905306818 Mon Sep 17 00:00:00 2001 From: Dominik Michael Rauh Date: Fri, 22 Nov 2019 10:47:54 +0100 Subject: [PATCH] pythonPackages.mnist: init at 0.2.2 --- .../python-modules/mnist/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/mnist/default.nix diff --git a/pkgs/development/python-modules/mnist/default.nix b/pkgs/development/python-modules/mnist/default.nix new file mode 100644 index 000000000000..022cd3a2e02b --- /dev/null +++ b/pkgs/development/python-modules/mnist/default.nix @@ -0,0 +1,36 @@ +{ buildPythonPackage, fetchFromGitHub, isPy27, lib, mock, numpy, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "mnist"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "datapythonista"; + repo = "mnist"; + rev = "${pname}-${version}"; + sha256 = "17r37pbxiv5dw857bmg990x836gq6sgww069w3q5jjg9m3xdm7dh"; + }; + + propagatedBuildInputs = [ numpy ] ++ lib.optional isPy27 mock; + + checkInputs = [ pytestCheckHook ]; + + dontUseSetuptoolsCheck = true; + + # disable tests which fail due to socket related errors + disabledTests = [ + "test_test_images_has_right_size" + "test_test_labels_has_right_size" + "test_train_images_has_right_size" + "test_train_labels_has_right_size" + ]; + + meta = with lib; { + description = "Python utilities to download and parse the MNIST dataset"; + homepage = "https://github.com/datapythonista/mnist"; + license = licenses.bsd3; + maintainers = with maintainers; [ dmrauh ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5c3800b72eff..99b00004e104 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -770,6 +770,8 @@ in { mkl-service = callPackage ../development/python-modules/mkl-service { }; + mnist = callPackage ../development/python-modules/mnist { }; + monkeyhex = callPackage ../development/python-modules/monkeyhex { }; monty = callPackage ../development/python-modules/monty { };