2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cython,
|
|
|
|
numpy,
|
|
|
|
oldest-supported-numpy,
|
|
|
|
scipy,
|
|
|
|
scikit-learn,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
wheel,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
self = buildPythonPackage rec {
|
|
|
|
pname = "opentsne";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.0.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pavlin-policar";
|
|
|
|
repo = "openTSNE";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-UTfEjjNz1mm5fhyTw9GRlMNURwWlr6kLMjrMngkFV3Y=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
oldest-supported-numpy
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
scikit-learn
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "openTSNE" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests.pytest = self.overridePythonAttrs (old: {
|
|
|
|
pname = "${old.pname}-tests";
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
postPatch = "rm openTSNE -rf";
|
|
|
|
|
|
|
|
doBuild = false;
|
|
|
|
doInstall = false;
|
|
|
|
|
|
|
|
doCheck = true;
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
self
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = with lib; {
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding";
|
|
|
|
homepage = "https://github.com/pavlin-policar/openTSNE";
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/v${version}";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ lucasew ];
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
};
|
2024-06-05 15:53:02 +00:00
|
|
|
in
|
|
|
|
self
|