# Maintainer: Gaute Hope # Contributor: Rich Li pkgname=python-cartopy pkgver=0.17.0 pkgrel=2 pkgdesc="A cartographic python library with matplotlib support for visualisation" url="https://scitools.org.uk/cartopy/docs/latest/" depends=('python-numpy' 'python-six' 'python-shapely' 'python-pyshp' 'python-pyproj' 'python-matplotlib' 'python-pillow' 'python-scipy') optdepends=('python-fiona: faster shapefile reading' 'python-gdal: for use with SRTM data' 'python-owslib: access OGC clients') makedepends=('python-setuptools' 'cython') checkdepends=('python-pytest' 'python-filelock') license=('LGPL3') arch=('x86_64') source=("$pkgname-$pkgver.tar.gz::https://github.com/SciTools/cartopy/archive/v${pkgver}.tar.gz") md5sums=('9fe063295a9fd854803d3c01a60720d0') sha1sums=('f9936ca8639d46a5c265652e383c6d7cabd20c58') sha256sums=('137642e63952404ec0841fa0333ad14c58fbbf19cca2a5ac6a38498c4b4998fb') build() { cd "$srcdir/cartopy-${pkgver}" python setup.py build } check() { cd "$srcdir/cartopy-${pkgver}" # Ignore the warnings (mostly deprecations and such), and also this test # failed for me, so let's disable it for now. pytest --disable-warnings \ -k "not test_gridliner" \ "build/lib.linux-${CARCH}-3.7/cartopy" # Remove any bytecode files generated from pytest (otherwise they'll be # installed in the package) find "build/lib.linux-${CARCH}-3.7/cartopy/tests" -name '*-PYTEST.pyc' -delete } package() { cd "$srcdir/cartopy-${pkgver}" python setup.py install --root="$pkgdir" --optimize=1 --skip-build }