2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
2024-06-20 14:57:18 +00:00
|
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
pyproj,
|
|
|
|
rasterio,
|
|
|
|
xarray,
|
2024-06-20 14:57:18 +00:00
|
|
|
# tests
|
|
|
|
dask,
|
|
|
|
netcdf4,
|
|
|
|
pytestCheckHook,
|
|
|
|
stdenv,
|
2024-06-05 15:53:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rioxarray";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "0.17.0";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "corteva";
|
|
|
|
repo = "rioxarray";
|
2024-06-20 14:57:18 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-mOXyfkreQ55vWmPCG2U/ijcKZqzHoQQLfKArSh2fDmA=";
|
2024-06-05 15:53:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2024-06-05 15:53:02 +00:00
|
|
|
numpy
|
|
|
|
packaging
|
|
|
|
pyproj
|
|
|
|
rasterio
|
|
|
|
xarray
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
dask
|
|
|
|
netcdf4
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
disabledTests =
|
|
|
|
[ "test_clip_geojson__no_drop" ]
|
|
|
|
++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
|
|
|
|
# numerical errors
|
|
|
|
"test_clip_geojson"
|
|
|
|
"test_open_rasterio_mask_chunk_clip"
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "rioxarray" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "geospatial xarray extension powered by rasterio";
|
|
|
|
homepage = "https://corteva.github.io/rioxarray/";
|
2024-06-20 14:57:18 +00:00
|
|
|
changelog = "https://github.com/corteva/rioxarray/releases/tag/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = lib.teams.geospatial.members;
|
|
|
|
};
|
|
|
|
}
|