Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / dtw-python / default.nix
blob02e4176e9b9782334ed6f223daa948d9c0844467
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , cython
5 , oldest-supported-numpy
6 , setuptools
7 , wheel
8 , scipy
9 , numpy
10 , pytestCheckHook
11 , pythonOlder
14 buildPythonPackage rec {
15   pname = "dtw-python";
16   version = "1.4.2";
17   format = "pyproject";
19   disabled = pythonOlder "3.6";
21   src = fetchFromGitHub {
22     owner = "DynamicTimeWarping";
23     repo = "dtw-python";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-Y0XzAPc2iJIp799gXTO7bUcHuOrDyqkd64DulLbdcAg=";
26   };
28   nativeBuildInputs = [
29     cython
30     oldest-supported-numpy
31     setuptools
32     wheel
33   ];
35   propagatedBuildInputs = [
36     scipy
37     numpy
38   ];
40   # We need to run tests on real built package: https://github.com/NixOS/nixpkgs/issues/255262
41   preCheck = "cd $out";
42   nativeCheckInputs = [ pytestCheckHook ];
43   # tests/ are not included to output package, so we have to set path explicitly
44   pytestFlagsArray = [
45     "$src/tests"
46   ];
48   pythonImportsCheck = [ "dtw" ];
50   meta = with lib; {
51     description = "Python port of R's Comprehensive Dynamic Time Warp algorithms package";
52     mainProgram = "dtw";
53     homepage = "https://github.com/DynamicTimeWarping/dtw-python";
54     changelog = "https://github.com/DynamicTimeWarping/dtw-python/blob/${src.rev}/CHANGELOG.md";
55     license = licenses.gpl3Only;
56     maintainers = with maintainers; [ mbalatsko ];
57   };