nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 120 lines 2.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 flit-core, 8 9 # dependencies 10 affine, 11 cachetools, 12 numpy, 13 pyproj, 14 shapely, 15 16 # optional-dependencies 17 azure-storage-blob, 18 boto3, 19 dask, 20 distributed, 21 rasterio, 22 tifffile, 23 xarray, 24 25 # tests 26 geopandas, 27 matplotlib, 28 pytestCheckHook, 29}: 30 31buildPythonPackage rec { 32 pname = "odc-geo"; 33 version = "0.5.0"; 34 pyproject = true; 35 36 src = fetchFromGitHub { 37 owner = "opendatacube"; 38 repo = "odc-geo"; 39 tag = "v${version}"; 40 hash = "sha256-qFHFT68hJKCBcYKZypSoQufHYXVm3LiD7mn5eQtYYO8="; 41 }; 42 43 build-system = [ 44 flit-core 45 ]; 46 47 dependencies = [ 48 affine 49 cachetools 50 numpy 51 pyproj 52 shapely 53 ]; 54 55 optional-dependencies = { 56 xr = [ xarray ]; 57 wrap = [ rasterio ]; 58 tiff = [ 59 dask 60 distributed 61 rasterio 62 tifffile 63 xarray 64 ]; 65 s3 = [ boto3 ]; 66 az = [ azure-storage-blob ]; 67 all = [ 68 azure-storage-blob 69 boto3 70 dask 71 distributed 72 rasterio 73 tifffile 74 xarray 75 ]; 76 }; 77 78 nativeCheckInputs = [ 79 geopandas 80 matplotlib 81 pytestCheckHook 82 ] 83 ++ optional-dependencies.all; 84 85 disabledTestMarks = [ "network" ]; 86 87 disabledTests = [ 88 # AttributeError (fixes: https://github.com/opendatacube/odc-geo/pull/202) 89 "test_azure_multipart_upload" 90 # network access 91 "test_empty_cog" 92 # urllib url open error 93 "test_country_geom" 94 "test_from_geopandas" 95 "test_geoboxtiles_intersect" 96 "test_warp_nan" 97 # requires imagecodecs package (currently not available on nixpkgs) 98 "test_cog_with_dask_smoke_test" 99 # xarray compat issue 100 "test_xr_reproject" 101 ]; 102 103 pythonImportsCheck = [ 104 "odc.geo" 105 "odc.geo.xr" 106 ]; 107 108 meta = { 109 description = "GeoBox and geometry utilities extracted from datacube-core"; 110 longDescription = '' 111 This library combines geometry shape classes from `shapely` with CRS from 112 `pyproj` to provide a number of data types and utilities useful for working 113 with geospatial metadata and geo-registered `xarray` rasters. 114 ''; 115 homepage = "https://github.com/opendatacube/odc-geo/"; 116 changelog = "https://github.com/opendatacube/odc-geo/releases/tag/${src.tag}"; 117 license = lib.licenses.asl20; 118 maintainers = with lib.maintainers; [ daspk04 ]; 119 }; 120}