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