Files
nixpkgs/pkgs/development/python-modules/dtw-python/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01: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 = {
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 = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ mbalatsko ];
mainProgram = "dtw";
};
}