2021-05-20 23:08:51 +00:00
|
|
|
{ buildPythonPackage, lib, fetchPypi
|
2021-04-13 19:44:15 +00:00
|
|
|
, pytestCheckHook, filelock, mock, pep8
|
|
|
|
, cython
|
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";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.20.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Cartopy";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "91f87b130e2574547a20cd634498df97d797abd12dcfd0235bc0cdbcec8b05e3";
|
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("
|
|
|
|
'';
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
geos # for geos-config
|
|
|
|
proj
|
|
|
|
];
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|