3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/basemap/default.nix
Robert Scott 3d38c01e5c pythonPackages.basemap: 1.0.7 -> 1.2.0, fixes build on py3.7
upstream seems to have moved to github without updating its pypi
packages
2019-04-27 23:25:33 +01:00

49 lines
1.3 KiB
Nix

{ stdenv
, buildPythonPackage
, fetchFromGitHub
, numpy
, matplotlib
, pillow
, setuptools
, pyproj
, pyshp
, six
, pkgs
}:
buildPythonPackage rec {
pname = "basemap";
version = "1.2.0";
src = fetchFromGitHub {
owner = "matplotlib";
repo = "basemap";
rev = "v${version}rel";
sha256 = "1p3app8n65rlppkdbp1pb7fa4250kh7hi7lzdsryi2iv88np7193";
};
propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ];
buildInputs = [ setuptools pkgs.geos ];
# Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
configurePhase = ''
export GEOS_DIR=${pkgs.geos}
'';
# The 'check' target is not supported by the `setup.py` script.
# TODO : do the post install checks (`cd examples && ${python.interpreter} run_all.py`)
doCheck = false;
meta = with stdenv.lib; {
homepage = "https://matplotlib.org/basemap/";
description = "Plot data on map projections with matplotlib";
longDescription = ''
An add-on toolkit for matplotlib that lets you plot data on map projections with
coastlines, lakes, rivers and political boundaries. See
http://matplotlib.github.com/basemap/users/examples.html for examples of what it can do.
'';
license = with licenses; [ mit gpl2 ];
};
}