1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 flit-core,
7 pytestCheckHook,
8 numpy,
9 xarray,
10 xarray-dataclasses,
11}:
12
13buildPythonPackage rec {
14 pname = "spatial-image";
15 version = "1.0.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "spatial-image";
22 repo = "spatial-image";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-nCsxPhIgGmZZntYbhQ3KnzptcKdN288eNixbQDgECSQ=";
25 };
26
27 nativeBuildInputs = [ flit-core ];
28
29 propagatedBuildInputs = [
30 numpy
31 xarray
32 xarray-dataclasses
33 ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 pythonImportsCheck = [ "spatial_image" ];
38
39 meta = with lib; {
40 description = "A multi-dimensional spatial image data structure for scientific Python";
41 homepage = "https://github.com/spatial-image/spatial-image";
42 changelog = "https://github.com/spatial-image/spatial-image/releases/tag/v${version}";
43 license = licenses.mit;
44 maintainers = with maintainers; [ bcdarwin ];
45 };
46}