Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / opentsne / default.nix
blobba3e0b8460b193d3fe899f5420a2a1aa7f14859c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , cython
5 , numpy
6 , oldest-supported-numpy
7 , scipy
8 , scikit-learn
9 , pytestCheckHook
10 , pythonOlder
11 , setuptools
12 , wheel
15 let
16   self = buildPythonPackage rec {
17     pname = "opentsne";
18     version = "1.0.1";
19     pyproject = true;
21     disabled = pythonOlder "3.7";
23     src = fetchFromGitHub {
24       owner = "pavlin-policar";
25       repo = "openTSNE";
26       rev = "refs/tags/v${version}";
27       hash = "sha256-UTfEjjNz1mm5fhyTw9GRlMNURwWlr6kLMjrMngkFV3Y=";
28     };
30     nativeBuildInputs = [
31       cython
32       oldest-supported-numpy
33       setuptools
34       wheel
35     ];
37     propagatedBuildInputs = [
38       numpy
39       scipy
40       scikit-learn
41     ];
43     pythonImportsCheck = [
44       "openTSNE"
45     ];
47     doCheck = false;
49     passthru = {
50       tests.pytest = self.overridePythonAttrs (old: {
51         pname = "${old.pname}-tests";
52         format = "other";
54         postPatch = "rm openTSNE -rf";
56         doBuild = false;
57         doInstall = false;
59         doCheck = true;
60         nativeCheckInputs = [ pytestCheckHook self ];
61       });
62     };
64     meta = with lib; {
65       description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding";
66       homepage = "https://github.com/pavlin-policar/openTSNE";
67       changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/v${version}";
68       license = licenses.bsd3;
69       maintainers = with maintainers; [ lucasew ];
70     };
71   };
72 in self