Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / basemap / default.nix
blobc3d29d932442a460871a63ba7fcd82843f6a2284
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonAtLeast
5 , numpy
6 , matplotlib
7 , pillow
8 , setuptools
9 , pyproj
10 , pyshp
11 , six
12 , pkgs
15 buildPythonPackage rec {
16   pname = "basemap";
17   version = "1.2.1";
19   src = fetchFromGitHub {
20     owner = "matplotlib";
21     repo = "basemap";
22     rev = "v${version}rel";
23     sha256 = "13lw1iwa8hadpvqdgb06nh881l8c17awzvvwbfwblvb9q9s0lnzp";
24   };
26   propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ];
27   buildInputs = [ setuptools pkgs.geos ];
29   # Standard configurePhase from `buildPythonPackage` seems to break the setup.py script
30   configurePhase = ''
31     export GEOS_DIR=${pkgs.geos}
32   '';
34   # The 'check' target is not supported by the `setup.py` script.
35   # TODO : do the post install checks (`cd examples && ${python.interpreter} run_all.py`)
36   doCheck = false;
38   meta = with lib; {
39     homepage = "https://matplotlib.org/basemap/";
40     description = "Plot data on map projections with matplotlib";
41     longDescription = ''
42       An add-on toolkit for matplotlib that lets you plot data on map projections with
43       coastlines, lakes, rivers and political boundaries. See
44       http://matplotlib.github.com/basemap/users/examples.html for examples of what it can do.
45     '';
46     license = with licenses; [ mit gpl2 ];
47     broken = pythonAtLeast "3.9";
48   };