diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index 1ec6448d74c1..3e5f7fb4503a 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -1,30 +1,84 @@ -{ buildPythonPackage, lib, fetchFromGitHub, isPy3k -, cython, setuptools -, numpy, affine, attrs, cligj, click-plugins, snuggs, gdal -, pytest, pytest-cov, packaging, hypothesis, boto3, mock -, certifi, shapely +{ lib +, buildPythonPackage +, fetchFromGitHub + +# build time +, cython +, gdal + +# runtime +, affine +, attrs +, boto3 +, click +, click-plugins +, cligj +, matplotlib +, numpy +, snuggs + +# tests +, hypothesis +, packaging +, pytest-randomly +, pytestCheckHook +, shapely }: buildPythonPackage rec { pname = "rasterio"; - version = "1.2.6"; + version = "1.2.10"; # not x.y[ab]z, those are alpha/beta versions + format = "pyproject"; # Pypi doesn't ship the tests, so we fetch directly from GitHub src = fetchFromGitHub { - owner = "mapbox"; + owner = "rasterio"; repo = "rasterio"; rev = version; - sha256 = "sha256-rf2qdUhbS4Z2+mvlN1RzZvlgTgjqiBoQzry4z5QLSUc="; + hash = "sha256-xVGwQfQvxsqYihUYXENJAz9Qp9xBkhsGc/RheRTJxgo="; }; - checkInputs = [ boto3 pytest pytest-cov packaging hypothesis shapely ] ++ lib.optional (!isPy3k) mock; - nativeBuildInputs = [ cython gdal ]; - propagatedBuildInputs = [ certifi gdal numpy attrs affine cligj click-plugins snuggs setuptools ]; + nativeBuildInputs = [ + cython + gdal + ]; + + propagatedBuildInputs = [ + affine + attrs + boto3 + click + click-plugins + cligj + matplotlib + numpy + snuggs + ]; + + preCheck = '' + rm -rf rasterio + ''; + + checkInputs = [ + pytest-randomly + pytestCheckHook + packaging + hypothesis + shapely + ]; + + pytestFlagsArray = [ + "-m 'not network'" + ]; + + pythonImportsCheck = [ + "rasterio" + ]; meta = with lib; { description = "Python package to read and write geospatial raster data"; - license = licenses.bsd3; homepage = "https://rasterio.readthedocs.io/en/latest/"; + license = licenses.bsd3; maintainers = with maintainers; [ mredaelli ]; }; }