python3Packages.cartopy: Use updated proj, fix tests and mark unbroken
This commit is contained in:
parent
75eb8e50df
commit
fcacfa03df
1 changed files with 29 additions and 26 deletions
|
@ -1,10 +1,9 @@
|
||||||
{ buildPythonPackage, lib, fetchPypi
|
{ buildPythonPackage, lib, fetchPypi, fetchpatch
|
||||||
, pytest_4, filelock, mock, pep8
|
, pytestCheckHook, filelock, mock, pep8
|
||||||
, cython, isPy27
|
, cython
|
||||||
, six, pyshp, shapely, geos, numpy
|
, six, pyshp, shapely, geos, numpy
|
||||||
, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
|
, gdal, pillow, matplotlib, pyepsg, pykdtree, scipy, owslib, fiona
|
||||||
, xvfb_run
|
, proj
|
||||||
, proj_5 # see https://github.com/SciTools/cartopy/pull/1252 for status on proj 6 support
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -17,28 +16,16 @@ buildPythonPackage rec {
|
||||||
sha256 = "0d24fk0cbp29gmkysrwq05vry13swmwi3vx3cpcy04c0ixz33ykz";
|
sha256 = "0d24fk0cbp29gmkysrwq05vry13swmwi3vx3cpcy04c0ixz33ykz";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [ filelock mock pytest_4 pep8 ];
|
patches = [
|
||||||
|
# Fix numpy-1.20 compatibility. Will be part of 0.19.
|
||||||
# several tests require network connectivity: we disable them.
|
(fetchpatch {
|
||||||
# also py2.7's tk is over-eager in trying to open an x display,
|
url = "https://github.com/SciTools/cartopy/commit/e663bbbef07989a5f8484a8f36ea9c07e61d14ce.patch";
|
||||||
# so give it xvfb
|
sha256 = "061kbjgzkc3apaz6sxy00pkgy3n9dxcgps5wzj4rglb5iy86n2kq";
|
||||||
checkPhase = let
|
})
|
||||||
maybeXvfbRun = lib.optionalString isPy27 "${xvfb_run}/bin/xvfb-run";
|
|
||||||
in ''
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
${maybeXvfbRun} pytest --pyargs cartopy \
|
|
||||||
-m "not network and not natural_earth" \
|
|
||||||
-k "not test_nightshade_image and not background_img"
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cython
|
|
||||||
geos # for geos-config
|
|
||||||
proj_5
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
geos proj_5
|
geos proj
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -49,12 +36,28 @@ buildPythonPackage rec {
|
||||||
gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib
|
gdal pillow matplotlib pyepsg pykdtree scipy fiona owslib
|
||||||
];
|
];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook filelock mock pep8 ];
|
||||||
|
|
||||||
|
pytestFlagsArray = [
|
||||||
|
"--pyargs" "cartopy"
|
||||||
|
"-m" "'not network and not natural_earth'"
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
"test_nightshade_image"
|
||||||
|
"background_img"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cython
|
||||||
|
geos # for geos-config
|
||||||
|
proj
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Process geospatial data to create maps and perform analyses";
|
description = "Process geospatial data to create maps and perform analyses";
|
||||||
license = licenses.lgpl3;
|
license = licenses.lgpl3;
|
||||||
homepage = "https://scitools.org.uk/cartopy/docs/latest/";
|
homepage = "https://scitools.org.uk/cartopy/docs/latest/";
|
||||||
maintainers = with maintainers; [ mredaelli ];
|
maintainers = with maintainers; [ mredaelli ];
|
||||||
# following tests fail: test_eccentric_globe and test_ellipse_globe
|
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue