1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

pythonPAckages.basemap: refactor move to python-modules

This commit is contained in:
Chris Ostrouchov 2018-10-29 13:23:44 -04:00
parent b67cc15b3e
commit c9d4ba2407
No known key found for this signature in database
GPG key ID: 9ED59B0AB1EAF573
2 changed files with 44 additions and 31 deletions

View file

@ -0,0 +1,43 @@
{ stdenv
, buildPythonPackage
, fetchurl
, numpy
, matplotlib
, pillow
, setuptools
, pkgs
}:
buildPythonPackage rec {
pname = "basemap";
version = "1.0.7";
src = fetchurl {
url = "mirror://sourceforge/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz";
sha256 = "0ca522zirj5sj10vg3fshlmgi615zy5gw2assapcj91vsvhc4zp0";
};
propagatedBuildInputs = [ numpy matplotlib pillow ];
buildInputs = [ setuptools pkgs.geos pkgs.proj ];
# 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 ];
};
}

View file

@ -4417,37 +4417,7 @@ in {
ofxtools = callPackage ../development/python-modules/ofxtools { };
basemap = buildPythonPackage rec {
name = "basemap-1.0.7";
src = pkgs.fetchurl {
url = "mirror://sourceforge/project/matplotlib/matplotlib-toolkits/basemap-1.0.7/basemap-1.0.7.tar.gz";
sha256 = "0ca522zirj5sj10vg3fshlmgi615zy5gw2assapcj91vsvhc4zp0";
};
propagatedBuildInputs = with self; [ numpy matplotlib pillow ];
buildInputs = with self; with pkgs ; [ setuptools geos proj ];
# 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 = {
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 ];
};
};
basemap = callPackage ../development/python-modules/basemap { };
dicttoxml = callPackage ../development/python-modules/dicttoxml { };