30 rasterio, # required to run version test
33 buildPythonPackage rec {
38 disabled = pythonOlder "3.8";
40 src = fetchFromGitHub {
43 rev = "refs/tags/${version}";
44 hash = "sha256-Yh3n2oyARf7LAtJU8Oa3WWc+oscl7e2N7jpW0v1uTVk=";
48 # remove useless import statement requiring distutils to be present at the runtime
49 substituteInPlace rasterio/rio/calc.py \
50 --replace-fail "from distutils.version import LooseVersion" ""
52 # relax numpy dependency
53 substituteInPlace pyproject.toml \
54 --replace-fail "numpy>=2.0.0,<3.0" "numpy"
65 propagatedBuildInputs = [
76 optional-dependencies = {
77 ipython = [ ipython ];
78 plot = [ matplotlib ];
94 rm -r rasterio # prevent importing local rasterio
97 pytestFlagsArray = [ "-m 'not network'" ];
101 "test_outer_boundless_pixel_fidelity"
102 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "test_reproject_error_propagation" ];
104 pythonImportsCheck = [ "rasterio" ];
106 passthru.tests.version = testers.testVersion {
109 command = "${rasterio}/bin/rio --version";
113 description = "Python package to read and write geospatial raster data";
115 homepage = "https://rasterio.readthedocs.io/";
116 changelog = "https://github.com/rasterio/rasterio/blob/${version}/CHANGES.txt";
117 license = licenses.bsd3;
118 maintainers = teams.geospatial.members;