1{ buildPythonPackage, lib, fetchFromGitHub, isPy3k
2, cython, setuptools
3, numpy, affine, attrs, cligj, click-plugins, snuggs, gdal
4, pytest, pytestcov, packaging, hypothesis, boto3, mock
5}:
6
7buildPythonPackage rec {
8 pname = "rasterio";
9 version = "1.1.2";
10
11 # Pypi doesn't ship the tests, so we fetch directly from GitHub
12 src = fetchFromGitHub {
13 owner = "mapbox";
14 repo = "rasterio";
15 rev = version;
16 sha256 = "12szhfify7wn02cbiz9xapwfyp7bg0zm2ja9wq4jyaz5ijy6rm45";
17 };
18
19 checkInputs = [ boto3 pytest pytestcov packaging hypothesis ] ++ lib.optional (!isPy3k) mock;
20 nativeBuildInputs = [ cython gdal ];
21 propagatedBuildInputs = [ gdal numpy attrs affine cligj click-plugins snuggs setuptools ];
22
23 meta = with lib; {
24 description = "Python package to read and write geospatial raster data";
25 license = licenses.bsd3;
26 homepage = https://rasterio.readthedocs.io/en/latest/;
27 maintainers = with maintainers; [ mredaelli ];
28 };
29}