From 39d1108b80662e49aa5535ec4c2215b26cdb8254 Mon Sep 17 00:00:00 2001 From: Massimo Redaelli Date: Sun, 25 Nov 2018 10:23:33 +0100 Subject: [PATCH] pythonPackages.cartopy: init at 0.17.0 --- .../python-modules/cartopy/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/cartopy/default.nix diff --git a/pkgs/development/python-modules/cartopy/default.nix b/pkgs/development/python-modules/cartopy/default.nix new file mode 100644 index 00000000000..64f649ad28a --- /dev/null +++ b/pkgs/development/python-modules/cartopy/default.nix @@ -0,0 +1,46 @@ +{ buildPythonPackage, lib, fetchPypi +, pytest, filelock, mock, pep8 +, cython, isPy37, glibcLocales +, six, pyshp, shapely, geos, proj, numpy +, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona +}: + +buildPythonPackage rec { + pname = "cartopy"; + version = "0.17.0"; + + src = fetchPypi { + inherit version; + pname = "Cartopy"; + sha256 = "0q9ckfi37cxj7jwnqnzij62vwcf4krccx576vv5lhvpgvplxjjs2"; + }; + + checkInputs = [ filelock mock pytest pep8 ]; + + # several tests require network connectivity: we disable them + checkPhase = '' + export HOME=$(mktemp -d) + pytest --pyargs cartopy \ + -m "not network and not natural_earth" \ + -k "not test_nightshade_image" + ''; + + buildInputs = [ cython glibcLocales ]; + LC_ALL = "en_US.UTF-8"; + + propagatedBuildInputs = [ + # required + six pyshp shapely geos proj numpy + + # optional + gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib + ]; + + meta = with lib; { + description = "Process geospatial data to create maps and perform analyses"; + license = licenses.lgpl3; + homepage = https://scitools.org.uk/cartopy/docs/latest/; + maintainers = with maintainers; [ mredaelli ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad9bdd62da7..481e7a9b60c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1136,6 +1136,8 @@ in { carrot = callPackage ../development/python-modules/carrot {}; + cartopy = callPackage ../development/python-modules/cartopy {}; + case = callPackage ../development/python-modules/case {}; cassandra-driver = callPackage ../development/python-modules/cassandra-driver { };