diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-07-16 12:58:59 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-07-21 22:33:42 +0200 |
commit | 48cf8c5d514230814f652bef224a6a68f7261c8f (patch) | |
tree | 8cbe34b9ec733a31c8b39c4efd994e9f2f3449bf /pkgs/development/python-modules/basemap | |
parent | a82e28f1b5a6f761645da122235d2298b80257ee (diff) |
python3Packages.basemap: 1.3.2 -> 1.3.3
Diffstat (limited to 'pkgs/development/python-modules/basemap')
-rw-r--r-- | pkgs/development/python-modules/basemap/default.nix | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/basemap/default.nix b/pkgs/development/python-modules/basemap/default.nix index 6d8dd8a3943b0..b0a1aac746fff 100644 --- a/pkgs/development/python-modules/basemap/default.nix +++ b/pkgs/development/python-modules/basemap/default.nix @@ -2,39 +2,66 @@ , buildPythonPackage , fetchFromGitHub , pythonAtLeast +, basemap-data +, cython +, geos , numpy , matplotlib , pillow -, setuptools , pyproj , pyshp -, six -, pkgs +, python +, setuptools }: buildPythonPackage rec { pname = "basemap"; - version = "1.3.2"; + version = "1.3.3"; src = fetchFromGitHub { owner = "matplotlib"; repo = "basemap"; - rev = "v${version}"; - sha256 = "sha256-onNdOQL4i6GTcuCRel5yanJ2EQ5iYClp+imuBObXF2I="; + rev = "refs/tags/v${version}"; + sha256 = "sha256-ObRQ5GsYx3k7fLaaK5Z4Td54rW/Nnx5+2zm8KLCIZl8="; }; - propagatedBuildInputs = [ numpy matplotlib pillow pyproj pyshp six ]; - buildInputs = [ setuptools pkgs.geos ]; + sourceRoot = "source/packages/basemap"; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "numpy >= 1.21, < 1.23" "numpy >= 1.21, < 1.24" \ + --replace "pyshp >= 1.2, < 2.2" "pyshp >= 1.2, < 2.4" + ''; + + nativeBuildInputs = [ + cython + geos + setuptools + ]; + + propagatedBuildInputs = [ + basemap-data + numpy + matplotlib + pillow # undocumented optional dependency + pyproj + pyshp + ]; # Standard configurePhase from `buildPythonPackage` seems to break the setup.py script - configurePhase = '' - export GEOS_DIR=${pkgs.geos} + preBuild = '' + export GEOS_DIR=${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`) + # test have various problems including requiring internet connection, permissions issues, problems with latest version of pillow doCheck = false; + checkPhase = '' + cd ../../examples + export HOME=$TEMPDIR + ${python.interpreter} run_all.py + ''; + meta = with lib; { homepage = "https://matplotlib.org/basemap/"; description = "Plot data on map projections with matplotlib"; @@ -43,8 +70,7 @@ buildPythonPackage rec { 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 ]; - broken = pythonAtLeast "3.9"; + maintainers = with maintainers; [ ]; + license = with licenses; [ mit lgpl21 ]; }; - } |