Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cython,
6 numpy,
7 scipy,
8 scikit-learn,
9 pytestCheckHook,
10 setuptools,
11}:
12
13let
14 self = buildPythonPackage rec {
15 pname = "opentsne";
16 version = "1.0.4";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "pavlin-policar";
21 repo = "openTSNE";
22 tag = "v${version}";
23 hash = "sha256-cGnhdGpDiBlTeeveCtnveslDytpNO8vtYkxQQ7FhsuA=";
24 };
25
26 build-system = [
27 cython
28 numpy
29 setuptools
30 ];
31
32 dependencies = [
33 numpy
34 scipy
35 scikit-learn
36 ];
37
38 pythonImportsCheck = [ "openTSNE" ];
39
40 doCheck = false;
41
42 passthru = {
43 tests.pytest = self.overridePythonAttrs (old: {
44 pname = "${old.pname}-tests";
45 pyproject = false;
46
47 postPatch = "rm openTSNE -rf";
48
49 doBuild = false;
50 doInstall = false;
51
52 doCheck = true;
53 nativeCheckInputs = [
54 pytestCheckHook
55 self
56 ];
57 });
58 };
59
60 meta = {
61 description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding";
62 homepage = "https://github.com/pavlin-policar/openTSNE";
63 changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/v${version}";
64 license = lib.licenses.bsd3;
65 maintainers = with lib.maintainers; [ lucasew ];
66 };
67 };
68in
69self