2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, stdenv
|
2022-04-15 01:41:22 +00:00
|
|
|
, affine
|
|
|
|
, attrs
|
|
|
|
, boto3
|
2023-02-02 18:25:31 +00:00
|
|
|
, buildPythonPackage
|
2022-04-15 01:41:22 +00:00
|
|
|
, click
|
|
|
|
, click-plugins
|
|
|
|
, cligj
|
2023-02-02 18:25:31 +00:00
|
|
|
, certifi
|
|
|
|
, cython
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gdal
|
|
|
|
, hypothesis
|
2022-04-15 01:41:22 +00:00
|
|
|
, matplotlib
|
2023-02-02 18:25:31 +00:00
|
|
|
, ipython
|
2022-04-15 01:41:22 +00:00
|
|
|
, numpy
|
|
|
|
, packaging
|
|
|
|
, pytest-randomly
|
|
|
|
, pytestCheckHook
|
2023-02-02 18:25:31 +00:00
|
|
|
, pythonOlder
|
|
|
|
, setuptools
|
2022-04-15 01:41:22 +00:00
|
|
|
, shapely
|
2023-02-02 18:25:31 +00:00
|
|
|
, snuggs
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rasterio";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "1.3.6";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-04-15 01:41:22 +00:00
|
|
|
owner = "rasterio";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "rasterio";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-C5jenXcONNYiUNa5GQ7ATBi8m0JWvg8Dyp9+ejGX+Fs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
gdal
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
affine
|
|
|
|
attrs
|
|
|
|
click
|
|
|
|
click-plugins
|
|
|
|
cligj
|
2023-02-02 18:25:31 +00:00
|
|
|
certifi
|
2022-04-15 01:41:22 +00:00
|
|
|
numpy
|
|
|
|
snuggs
|
2023-02-02 18:25:31 +00:00
|
|
|
setuptools
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
ipython = [
|
|
|
|
ipython
|
|
|
|
];
|
|
|
|
plot = [
|
|
|
|
matplotlib
|
|
|
|
];
|
|
|
|
s3 = [
|
|
|
|
boto3
|
|
|
|
];
|
|
|
|
};
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
hypothesis
|
|
|
|
packaging
|
2022-04-15 01:41:22 +00:00
|
|
|
pytest-randomly
|
|
|
|
pytestCheckHook
|
|
|
|
shapely
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not network'"
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
"test_reproject_error_propagation"
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"rasterio"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
doInstallCheck = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/rio --version | grep ${version} > /dev/null
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package to read and write geospatial raster data";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://rasterio.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/rasterio/rasterio/blob/${version}/CHANGES.txt";
|
2022-04-15 01:41:22 +00:00
|
|
|
license = licenses.bsd3;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = teams.geospatial.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|