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 13}: 14 15let 16 self = buildPythonPackage rec { 17 pname = "opentsne"; 18 version = "1.0.0"; 19 format = "pyproject"; 20 21 src = fetchFromGitHub { 22 owner = "pavlin-policar"; 23 repo = "openTSNE"; 24 rev = "v${version}"; 25 hash = "sha256-L5Qx6dMJlXF3EaWwlFTQ3dkhGXc5PvQBXYJo+QO+Hxc="; 26 }; 27 28 nativeBuildInputs = [ 29 cython 30 oldest-supported-numpy 31 setuptools 32 wheel 33 ]; 34 35 propagatedBuildInputs = [ numpy scipy scikit-learn ]; 36 37 pythonImportsCheck = [ "openTSNE" ]; 38 doCheck = false; 39 40 passthru = { 41 updateScript = nix-update-script {}; 42 tests.pytest = self.overridePythonAttrs (old: { 43 pname = "${old.pname}-tests"; 44 format = "other"; 45 46 postPatch = "rm openTSNE -rf"; 47 48 doBuild = false; 49 doInstall = false; 50 51 doCheck = true; 52 nativeCheckInputs = [ pytestCheckHook self ]; 53 }); 54 }; 55 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 }; 64in self