Files
nixpkgs/pkgs/development/python-modules/dtw-python/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
cython,
oldest-supported-numpy,
setuptools,
wheel,
scipy,
numpy,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "dtw-python";
version = "1.7.2";
pyproject = true;
src = fetchFromGitHub {
owner = "DynamicTimeWarping";
repo = "dtw-python";
tag = "v${version}";
hash = "sha256-DaYqKvjbp2yjL0a5f+vkB4OFOCWqt+f1HUUfarbns3A=";
};
build-system = [
cython
oldest-supported-numpy
setuptools
wheel
];
dependencies = [
scipy
numpy
];
# We need to run tests on real built package: https://github.com/NixOS/nixpkgs/issues/255262
# tests/ are not included to output package, so we have to set path explicitly
preCheck = ''
appendToVar enabledTestPaths "$src/tests"
cd $out
'';
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "dtw" ];
meta = with lib; {
description = "Python port of R's Comprehensive Dynamic Time Warp algorithms package";
homepage = "https://github.com/DynamicTimeWarping/dtw-python";
changelog = "https://github.com/DynamicTimeWarping/dtw-python/blob/${src.tag}/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ mbalatsko ];
mainProgram = "dtw";
};
}