diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/python-modules/rasterio | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/rasterio')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/rasterio/default.nix | 94 |
1 files changed, 81 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/rasterio/default.nix b/nixpkgs/pkgs/development/python-modules/rasterio/default.nix index 1ec6448d74c1..7876e6667491 100644 --- a/nixpkgs/pkgs/development/python-modules/rasterio/default.nix +++ b/nixpkgs/pkgs/development/python-modules/rasterio/default.nix @@ -1,30 +1,98 @@ -{ buildPythonPackage, lib, fetchFromGitHub, isPy3k -, cython, setuptools -, numpy, affine, attrs, cligj, click-plugins, snuggs, gdal -, pytest, pytest-cov, packaging, hypothesis, boto3, mock -, certifi, shapely +{ lib +, stdenv +, buildPythonPackage +, fetchFromGitHub +, pythonOlder + +# build time +, cython +, gdal + +# runtime +, affine +, attrs +, boto3 +, click +, click-plugins +, cligj +, matplotlib +, numpy +, snuggs +, setuptools + +# tests +, hypothesis +, packaging +, pytest-randomly +, pytestCheckHook +, shapely }: buildPythonPackage rec { pname = "rasterio"; - version = "1.2.6"; + version = "1.3.0"; # not x.y[ab]z, those are alpha/beta versions + format = "pyproject"; + disabled = pythonOlder "3.6"; # 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="; + rev = "refs/tags/${version}"; + hash = "sha256-CBnG1zNMOL3rAmnErv7XZZ2Cu9W+DnRPcjtKdmYXHUA="; }; - 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 + setuptools # needs pkg_resources at runtime + ]; + + preCheck = '' + rm -rf rasterio + ''; + + checkInputs = [ + pytest-randomly + pytestCheckHook + packaging + hypothesis + shapely + ]; + + pytestFlagsArray = [ + "-m 'not network'" + ]; + + disabledTests = lib.optionals stdenv.isDarwin [ + "test_reproject_error_propagation" + ]; + + pythonImportsCheck = [ + "rasterio" + ]; + + doInstallCheck = true; + installCheckPhase = '' + $out/bin/rio --version | grep ${version} > /dev/null + ''; 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 ]; }; } |