Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / opentsne / default.nix
blob9fc3c7fe8143f2ce1463e76b869c56c7f5db0352
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , cython
5 , numpy
6 , oldest-supported-numpy
7 , scipy
8 , scikit-learn
9 , pytestCheckHook
10 , nix-update-script
11 , setuptools
12 , wheel
15 let
16   self = buildPythonPackage rec {
17     pname = "opentsne";
18     version = "1.0.0";
19     format = "pyproject";
21     src = fetchFromGitHub {
22       owner = "pavlin-policar";
23       repo = "openTSNE";
24       rev = "v${version}";
25       hash = "sha256-L5Qx6dMJlXF3EaWwlFTQ3dkhGXc5PvQBXYJo+QO+Hxc=";
26     };
28     nativeBuildInputs = [
29       cython
30       oldest-supported-numpy
31       setuptools
32       wheel
33     ];
35     propagatedBuildInputs = [ numpy scipy scikit-learn ];
37     pythonImportsCheck = [ "openTSNE" ];
38     doCheck = false;
40     passthru = {
41       updateScript = nix-update-script {};
42       tests.pytest = self.overridePythonAttrs (old: {
43         pname = "${old.pname}-tests";
44         format = "other";
46         postPatch = "rm openTSNE -rf";
48         doBuild = false;
49         doInstall = false;
51         doCheck = true;
52         nativeCheckInputs = [ pytestCheckHook self ];
53       });
54     };
56     meta = {
57       description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding";
58       homepage = "https://github.com/pavlin-policar/openTSNE";
59       changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/${version}";
60       license = [ lib.licenses.bsd3 ];
61       maintainers = [ lib.maintainers.lucasew ];
62     };
63   };
64 in self