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