From 1924bb8b148458d7252bd72d46bf3c1839c35079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 24 Jan 2021 05:14:01 +0100 Subject: [PATCH] python3.pkgs.pynndescent: init at 0.5.1 --- .../python-modules/pynndescent/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/pynndescent/default.nix diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix new file mode 100644 index 000000000000..fd0aa18de14a --- /dev/null +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchPypi +, fetchpatch +, nose +, scikitlearn +, scipy +, numba +, llvmlite +, joblib +}: + +buildPythonPackage rec { + pname = "pynndescent"; + version = "0.5.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "74a05a54d13573a38878781d44812ac6df97d8762a56f9bb5dd87a99911820fe"; + }; + + patches = [ + # fixes tests, included in next version + (fetchpatch { + url = "https://github.com/lmcinnes/pynndescent/commit/ef5d8c3c3bfe976063b6621e3e0734c0c22d813b.patch"; + sha256 = "sha256-49n3kevs3wpzd4FfZVKmNpF2o1V8pJs4KOx8zCAhR3s="; + }) + ]; + + checkInputs = [ + nose + ]; + + propagatedBuildInputs = [ + scikitlearn + scipy + numba + llvmlite + joblib + ]; + + checkPhase = '' + nosetests + ''; + + meta = with lib; { + description = "Nearest Neighbor Descent"; + homepage = "https://github.com/lmcinnes/pynndescent"; + license = licenses.bsd2; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 070e855b0c41..20ce58f5bc57 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4849,6 +4849,8 @@ in { pkuseg = callPackage ../development/python-modules/pkuseg { }; + pynndescent = callPackage ../development/python-modules/pynndescent { }; + pysbd = callPackage ../development/python-modules/pysbd { }; python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };