567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
73 lines
1.4 KiB
Nix
73 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
cython,
|
|
numpy,
|
|
scipy,
|
|
scikit-learn,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
}:
|
|
|
|
let
|
|
self = buildPythonPackage rec {
|
|
pname = "opentsne";
|
|
version = "1.0.4";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pavlin-policar";
|
|
repo = "openTSNE";
|
|
tag = "v${version}";
|
|
hash = "sha256-cGnhdGpDiBlTeeveCtnveslDytpNO8vtYkxQQ7FhsuA=";
|
|
};
|
|
|
|
build-system = [
|
|
cython
|
|
numpy
|
|
setuptools
|
|
];
|
|
|
|
dependencies = [
|
|
numpy
|
|
scipy
|
|
scikit-learn
|
|
];
|
|
|
|
pythonImportsCheck = [ "openTSNE" ];
|
|
|
|
doCheck = false;
|
|
|
|
passthru = {
|
|
tests.pytest = self.overridePythonAttrs (old: {
|
|
pname = "${old.pname}-tests";
|
|
format = "other";
|
|
|
|
postPatch = "rm openTSNE -rf";
|
|
|
|
doBuild = false;
|
|
doInstall = false;
|
|
|
|
doCheck = true;
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
self
|
|
];
|
|
});
|
|
};
|
|
|
|
meta = {
|
|
description = "Modular Python implementation of t-Distributed Stochasitc Neighbor Embedding";
|
|
homepage = "https://github.com/pavlin-policar/openTSNE";
|
|
changelog = "https://github.com/pavlin-policar/openTSNE/releases/tag/v${version}";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ lucasew ];
|
|
};
|
|
};
|
|
in
|
|
self
|