1{ lib 2, stdenv 3, affine 4, attrs 5, boto3 6, buildPythonPackage 7, click 8, click-plugins 9, cligj 10, certifi 11, cython_3 12, fetchFromGitHub 13, gdal 14, hypothesis 15, matplotlib 16, ipython 17, numpy 18, oldest-supported-numpy 19, packaging 20, pytest-randomly 21, pytestCheckHook 22, pythonOlder 23, setuptools 24, shapely 25, snuggs 26, wheel 27}: 28 29buildPythonPackage rec { 30 pname = "rasterio"; 31 version = "1.3.9"; 32 format = "pyproject"; 33 34 disabled = pythonOlder "3.8"; 35 36 src = fetchFromGitHub { 37 owner = "rasterio"; 38 repo = "rasterio"; 39 rev = "refs/tags/${version}"; 40 hash = "sha256-Tp6BSU33FaszrIXQgU0Asb7IMue0C939o/atAKz+3Q4="; 41 }; 42 43 nativeBuildInputs = [ 44 cython_3 45 gdal 46 numpy 47 oldest-supported-numpy 48 setuptools 49 wheel 50 ]; 51 52 propagatedBuildInputs = [ 53 affine 54 attrs 55 click 56 click-plugins 57 cligj 58 certifi 59 numpy 60 snuggs 61 setuptools 62 ]; 63 64 passthru.optional-dependencies = { 65 ipython = [ 66 ipython 67 ]; 68 plot = [ 69 matplotlib 70 ]; 71 s3 = [ 72 boto3 73 ]; 74 }; 75 76 nativeCheckInputs = [ 77 boto3 78 hypothesis 79 packaging 80 pytest-randomly 81 pytestCheckHook 82 shapely 83 ]; 84 85 doCheck = true; 86 87 preCheck = '' 88 rm -r rasterio # prevent importing local rasterio 89 ''; 90 91 pytestFlagsArray = [ 92 "-m 'not network'" 93 ]; 94 95 disabledTests = lib.optionals stdenv.isDarwin [ 96 "test_reproject_error_propagation" 97 ]; 98 99 pythonImportsCheck = [ 100 "rasterio" 101 ]; 102 103 meta = with lib; { 104 description = "Python package to read and write geospatial raster data"; 105 homepage = "https://rasterio.readthedocs.io/"; 106 changelog = "https://github.com/rasterio/rasterio/blob/${version}/CHANGES.txt"; 107 license = licenses.bsd3; 108 maintainers = teams.geospatial.members; 109 }; 110}