at 22.05-pre 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonAtLeast 5, numpy 6, matplotlib 7, pillow 8, setuptools 9, pyproj 10, pyshp 11, six 12, pkgs 13}: 14 15buildPythonPackage rec { 16 pname = "basemap"; 17 version = "1.2.1"; 18 19 src = fetchFromGitHub { 20 owner = "matplotlib"; 21 repo = "basemap"; 22 rev = "v${version}rel"; 23 sha256 = "13lw1iwa8hadpvqdgb06nh881l8c17awzvvwbfwblvb9q9s0lnzp"; 24 }; 25 26 propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ]; 27 buildInputs = [ setuptools pkgs.geos ]; 28 29 # Standard configurePhase from `buildPythonPackage` seems to break the setup.py script 30 configurePhase = '' 31 export GEOS_DIR=${pkgs.geos} 32 ''; 33 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; 37 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 }; 49 50}