depot/third_party/nixpkgs/pkgs/development/python-modules/opentsne/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

72 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.2";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "pavlin-policar";
repo = "openTSNE";
rev = "refs/tags/v${version}";
hash = "sha256-e1YXF9cdguzcEW0KanIHYlZQiUc+FH8IVOaPshAswco=";
};
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 = with lib; {
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 = licenses.bsd3;
maintainers = with maintainers; [ lucasew ];
};
};
in
self