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-05-24 13:37:59 +00:00
|
|
|
version = "1.3.7";
|
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-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-6AtGRXGuAXMrePqS2lmNdOuPZi6LHuiWP2LJyxH3L3M=";
|
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 = ''
|
2023-05-24 13:37:59 +00:00
|
|
|
$out/bin/rio --show-versions | grep -E "rasterio:\s${version}" > /dev/null
|
|
|
|
$out/bin/rio --show-versions | grep -E "GDAL:\s[0-9]+(\.[0-9]+)*" > /dev/null
|
|
|
|
$out/bin/rio --show-versions | grep -E "PROJ:\s[0-9]+(\.[0-9]+)*" > /dev/null
|
|
|
|
$out/bin/rio --show-versions | grep -E "GEOS:\s[0-9]+(\.[0-9]+)*" > /dev/null
|
2022-06-16 17:23:12 +00:00
|
|
|
'';
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|