1{ buildPythonPackage, lib, fetchPypi
2, pytest, filelock, mock, pep8
3, cython, isPy37, glibcLocales
4, six, pyshp, shapely, geos, proj, numpy
5, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
6}:
7
8buildPythonPackage rec {
9 pname = "cartopy";
10 version = "0.17.0";
11
12 src = fetchPypi {
13 inherit version;
14 pname = "Cartopy";
15 sha256 = "0q9ckfi37cxj7jwnqnzij62vwcf4krccx576vv5lhvpgvplxjjs2";
16 };
17
18 checkInputs = [ filelock mock pytest pep8 ];
19
20 # several tests require network connectivity: we disable them
21 checkPhase = ''
22 export HOME=$(mktemp -d)
23 pytest --pyargs cartopy \
24 -m "not network and not natural_earth" \
25 -k "not test_nightshade_image"
26 '';
27
28 nativeBuildInputs = [
29 cython
30 geos # for geos-config
31 proj
32 ];
33
34 buildInputs = [
35 geos proj
36 ];
37
38 propagatedBuildInputs = [
39 # required
40 six pyshp shapely numpy
41
42 # optional
43 gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib
44 ];
45
46 meta = with lib; {
47 description = "Process geospatial data to create maps and perform analyses";
48 license = licenses.lgpl3;
49 homepage = https://scitools.org.uk/cartopy/docs/latest/;
50 maintainers = with maintainers; [ mredaelli ];
51 };
52
53}