1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 # build-system
7 setuptools,
8 # dependencies
9 numpy,
10 packaging,
11 pyproj,
12 rasterio,
13 xarray,
14 # tests
15 dask,
16 netcdf4,
17 pytestCheckHook,
18 stdenv,
19}:
20
21buildPythonPackage rec {
22 pname = "rioxarray";
23 version = "0.17.0";
24 pyproject = true;
25 disabled = pythonOlder "3.10";
26
27 src = fetchFromGitHub {
28 owner = "corteva";
29 repo = "rioxarray";
30 rev = "refs/tags/${version}";
31 hash = "sha256-mOXyfkreQ55vWmPCG2U/ijcKZqzHoQQLfKArSh2fDmA=";
32 };
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 numpy
38 packaging
39 pyproj
40 rasterio
41 xarray
42 ];
43
44 nativeCheckInputs = [
45 dask
46 netcdf4
47 pytestCheckHook
48 ];
49
50 disabledTests =
51 [ "test_clip_geojson__no_drop" ]
52 ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
53 # numerical errors
54 "test_clip_geojson"
55 "test_open_rasterio_mask_chunk_clip"
56 ];
57
58 pythonImportsCheck = [ "rioxarray" ];
59
60 meta = {
61 description = "geospatial xarray extension powered by rasterio";
62 homepage = "https://corteva.github.io/rioxarray/";
63 changelog = "https://github.com/corteva/rioxarray/releases/tag/${version}";
64 license = lib.licenses.asl20;
65 maintainers = lib.teams.geospatial.members;
66 };
67}