1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 numpy, 11 packaging, 12 pyproj, 13 rasterio, 14 xarray, 15 16 # tests 17 dask, 18 netcdf4, 19 pytestCheckHook, 20 stdenv, 21}: 22 23buildPythonPackage rec { 24 pname = "rioxarray"; 25 version = "0.19.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "corteva"; 30 repo = "rioxarray"; 31 tag = version; 32 hash = "sha256-tNcBuMyBVDVPbmujfn4WauquutOEn727lxcR19hfyuE="; 33 }; 34 35 build-system = [ setuptools ]; 36 37 dependencies = [ 38 numpy 39 packaging 40 pyproj 41 rasterio 42 xarray 43 ]; 44 45 nativeCheckInputs = [ 46 dask 47 netcdf4 48 pytestCheckHook 49 ]; 50 51 disabledTests = 52 [ 53 # AssertionError: assert 535727386 == 535691205 54 "test_clip_geojson__no_drop" 55 # Fails with GDAL 3.11 warning 56 "test_rasterio_vrt" 57 # Fails with small numerical errors on GDAL 3.11 58 "test_rasterio_vrt_gcps" 59 "test_reproject__gcps" 60 ] 61 ++ lib.optionals stdenv.hostPlatform.isAarch64 [ 62 # numerical errors 63 "test_clip_geojson" 64 "test_open_rasterio_mask_chunk_clip" 65 ]; 66 67 pythonImportsCheck = [ "rioxarray" ]; 68 69 meta = { 70 description = "Geospatial xarray extension powered by rasterio"; 71 homepage = "https://corteva.github.io/rioxarray/"; 72 changelog = "https://github.com/corteva/rioxarray/releases/tag/${version}"; 73 license = lib.licenses.asl20; 74 teams = [ lib.teams.geospatial ]; 75 }; 76}