blob: 33e59b64d7715405cac58955f926f20d4c68f1d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{
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 = [ ];
mainProgram = "dtw";
};
}
|