nixpkgs/pkgs/development/python-modules/cartopy/default.nix

64 lines
1.4 KiB
Nix
Raw Normal View History

{ buildPythonPackage, lib, fetchPypi
, pytestCheckHook, filelock, mock, pep8
, cython
2019-07-14 06:02:29 +00:00
, six, pyshp, shapely, geos, numpy
2018-11-25 09:23:33 +00:00
, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
, proj, flufl_lock
2018-11-25 09:23:33 +00:00
}:
buildPythonPackage rec {
pname = "cartopy";
version = "0.20.0";
2018-11-25 09:23:33 +00:00
src = fetchPypi {
inherit version;
pname = "Cartopy";
sha256 = "eae58aff26806e63cf115b2bce9477cedc4aa9f578c5e477b2c25cfa404f2b7a";
2018-11-25 09:23:33 +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("
'';
buildInputs = [
geos proj
];
2018-11-25 09:23:33 +00:00
propagatedBuildInputs = [
# required
six pyshp shapely numpy
2018-11-25 09:23:33 +00:00
# optional
gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib
];
checkInputs = [ pytestCheckHook filelock mock pep8 flufl_lock ];
pytestFlagsArray = [
"--pyargs" "cartopy"
"-m" "'not network and not natural_earth'"
];
disabledTests = [
"test_nightshade_image"
"background_img"
"test_gridliner_labels_bbox_style"
];
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.lgpl3Plus;
homepage = "https://scitools.org.uk/cartopy/docs/latest/";
2018-11-25 09:23:33 +00:00
maintainers = with maintainers; [ mredaelli ];
};
}