2021-04-11 17:56:51 +01:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, fetchpatch
|
|
|
|
, pytestCheckHook, filelock, mock, pep8
|
|
|
|
, cython
|
2019-07-14 07:02:29 +01:00
|
|
|
, six, pyshp, shapely, geos, numpy
|
2018-11-25 09:23:33 +00:00
|
|
|
, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
|
2021-04-11 17:56:51 +01:00
|
|
|
, proj
|
2018-11-25 09:23:33 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cartopy";
|
2020-09-18 11:05:37 +01:00
|
|
|
version = "0.18.0";
|
2018-11-25 09:23:33 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Cartopy";
|
2020-09-18 11:05:37 +01:00
|
|
|
sha256 = "0d24fk0cbp29gmkysrwq05vry13swmwi3vx3cpcy04c0ixz33ykz";
|
2018-11-25 09:23:33 +00:00
|
|
|
};
|
|
|
|
|
2021-04-11 17:56:51 +01:00
|
|
|
patches = [
|
|
|
|
# Fix numpy-1.20 compatibility. Will be part of 0.19.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/SciTools/cartopy/commit/e663bbbef07989a5f8484a8f36ea9c07e61d14ce.patch";
|
|
|
|
sha256 = "061kbjgzkc3apaz6sxy00pkgy3n9dxcgps5wzj4rglb5iy86n2kq";
|
|
|
|
})
|
2019-03-26 15:48:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-04-11 17:56:51 +01:00
|
|
|
geos proj
|
2019-03-26 15:48:57 +00:00
|
|
|
];
|
2018-11-25 09:23:33 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
# required
|
2019-03-26 15:48:57 +00:00
|
|
|
six pyshp shapely numpy
|
2018-11-25 09:23:33 +00:00
|
|
|
|
|
|
|
# optional
|
|
|
|
gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib
|
|
|
|
];
|
|
|
|
|
2021-04-11 17:56:51 +01:00
|
|
|
checkInputs = [ pytestCheckHook filelock mock pep8 ];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--pyargs" "cartopy"
|
|
|
|
"-m" "'not network and not natural_earth'"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_nightshade_image"
|
|
|
|
"background_img"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
geos # for geos-config
|
|
|
|
proj
|
|
|
|
];
|
|
|
|
|
2018-11-25 09:23:33 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Process geospatial data to create maps and perform analyses";
|
|
|
|
license = licenses.lgpl3;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://scitools.org.uk/cartopy/docs/latest/";
|
2018-11-25 09:23:33 +00:00
|
|
|
maintainers = with maintainers; [ mredaelli ];
|
|
|
|
};
|
|
|
|
}
|