diff options
author | Sam James <sam@gentoo.org> | 2022-10-07 20:37:44 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-07 20:57:59 +0100 |
commit | ae37b35c7b18f956411954e175b933597cf4ff5f (patch) | |
tree | aa150f5c76bfe9c0ee84de9d09479e38d0a862a2 | |
parent | sci-libs/cartopy: add pypi upstream metadata (diff) | |
download | gentoo-ae37b35c7b18f956411954e175b933597cf4ff5f.tar.gz gentoo-ae37b35c7b18f956411954e175b933597cf4ff5f.tar.bz2 gentoo-ae37b35c7b18f956411954e175b933597cf4ff5f.zip |
sci-libs/cartopy: add 0.21.0
- Tighten numpy dep (new bound w/ 0.21.0)
- New test dep on dev-python/pytest-mpl
- Drop proj dep, upstream moved to just pure pyproj
- Use epytest
- Use pytest-xdist (tests are fast on my machine but might be useful
on other arches)
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | sci-libs/cartopy/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/cartopy/cartopy-0.21.0.ebuild | 81 |
2 files changed, 82 insertions, 0 deletions
diff --git a/sci-libs/cartopy/Manifest b/sci-libs/cartopy/Manifest index ed9e1515b70e..194e19419632 100644 --- a/sci-libs/cartopy/Manifest +++ b/sci-libs/cartopy/Manifest @@ -1 +1,2 @@ DIST cartopy-0.20.3.tar.gz 10703747 BLAKE2B 794b0e837893c99bec54423731993a0321f3bd93a01bcc9c1ccfd056d4739d7f4b687c0c05e5e529edd8b350478dc76ccf9f3163061466ee6711949f360f7e7b SHA512 0ac4722ed541d77ac871438b2f4e5252c8ae0ab0551bd62a8ba654e10183bba2f702d70cc7331f1cce488c0a59fe4d24e7009de25d74a563f3b2763a12c504dd +DIST cartopy-0.21.0.gh.tar.gz 10815721 BLAKE2B 8a249d6e6b19d5a784a25d44fe062b5417811078f9b5362beed4e60f6a7e3d89996773a0b9530c96a27d3aa3a5a62ce05010ee17cc9ea71d33b9d7f6d1a5c602 SHA512 bb227e3f9ff591a33e7b4c053010321b04f2a03c68e84b1ea17cab125fc1d04f587b7f54125fe5bd3faae1379a0df8a217fd0ad5f85a7c461f9595f5b38f72f9 diff --git a/sci-libs/cartopy/cartopy-0.21.0.ebuild b/sci-libs/cartopy/cartopy-0.21.0.ebuild new file mode 100644 index 000000000000..e8fbb387686c --- /dev/null +++ b/sci-libs/cartopy/cartopy-0.21.0.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 multiprocessing virtualx + +MY_PV=${PV/_beta/b} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Python package for geospatial data processing and analysis" +HOMEPAGE="https://scitools.org.uk/cartopy" +SRC_URI="https://github.com/SciTools/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}"/${MY_P} + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + sci-libs/geos + $(python_gen_cond_dep ' + >=dev-python/numpy-1.19[${PYTHON_USEDEP}] + dev-python/shapely[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/scipy[${PYTHON_USEDEP}] + dev-python/pillow[jpeg,${PYTHON_USEDEP}] + dev-python/pyproj[${PYTHON_USEDEP}] + sci-libs/gdal[python,${PYTHON_USEDEP}] + sci-libs/pyshp[${PYTHON_USEDEP}] + ') +" +DEPEND="${RDEPEND}" +BDEPEND=" + $(python_gen_cond_dep ' + dev-python/setuptools_scm_git_archive[${PYTHON_USEDEP}] + dev-python/cython[${PYTHON_USEDEP}] + ') + test? ( + $(python_gen_cond_dep ' + dev-python/filelock[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/flufl-lock[${PYTHON_USEDEP}] + dev-python/pytest-mpl[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + ') + ) +" + +EPYTEST_IGNORE=( + # Require network access, not covered by markers + lib/cartopy/tests/mpl/test_crs.py + lib/cartopy/tests/mpl/test_gridliner.py +) + +distutils_enable_tests pytest + +python_prepare_all() { + export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} + + # Prepare matplotlib backend for test suite + export MPLCONFIGDIR="${T}" + echo "backend : Agg" > "${MPLCONFIGDIR}"/matplotlibrc || die + + distutils-r1_python_prepare_all +} + +python_test() { + cd "${BUILD_DIR}" || die + + # Drop all tests needing network access + virtx epytest -n "$(makeopts_jobs)" -m "not network and not natural_earth" || die "test failed" +} |