2021-05-20 23:08:51 +00:00
|
|
|
{ buildPythonPackage, lib, fetchPypi
|
2021-04-13 19:44:15 +00:00
|
|
|
, pytestCheckHook, filelock, mock, pep8
|
2022-02-10 20:34:41 +00:00
|
|
|
, cython, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
, six, pyshp, shapely, geos, numpy
|
|
|
|
, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
|
2021-05-20 23:08:51 +00:00
|
|
|
, proj, flufl_lock
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cartopy";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "0.21.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Cartopy";
|
2022-09-30 11:47:45 +00:00
|
|
|
sha256 = "sha256-zh06KKEy6UyJrDN2mlD4H2VjSrK9QFVjF+Fb1srRzkI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/SciTools/cartopy/issues/1880
|
|
|
|
substituteInPlace lib/cartopy/tests/test_crs.py \
|
|
|
|
--replace "test_osgb(" "dont_test_osgb(" \
|
|
|
|
--replace "test_epsg(" "dont_test_epsg("
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
geos # for geos-config
|
|
|
|
proj
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-04-13 19:44:15 +00:00
|
|
|
geos proj
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
# required
|
|
|
|
six pyshp shapely numpy
|
|
|
|
|
|
|
|
# optional
|
|
|
|
gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [ pytestCheckHook filelock mock pep8 flufl_lock ];
|
2021-04-13 19:44:15 +00:00
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--pyargs" "cartopy"
|
|
|
|
"-m" "'not network and not natural_earth'"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_nightshade_image"
|
|
|
|
"background_img"
|
2021-05-20 23:08:51 +00:00
|
|
|
"test_gridliner_labels_bbox_style"
|
2021-04-13 19:44:15 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Process geospatial data to create maps and perform analyses";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://scitools.org.uk/cartopy/docs/latest/";
|
|
|
|
maintainers = with maintainers; [ mredaelli ];
|
|
|
|
};
|
|
|
|
}
|