summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-09-20 16:49:36 +0200
committerMichał Górny <mgorny@gentoo.org>2020-09-20 16:56:46 +0200
commit9388e3a87073ccd03699ab4a39c0f8049841d370 (patch)
treee7e0b310107e583241b27e82fec0daef18c370d5
parentdev-python/pygobject: Skip tests on py2 (diff)
downloadgentoo-9388e3a87073ccd03699ab4a39c0f8049841d370.tar.gz
gentoo-9388e3a87073ccd03699ab4a39c0f8049841d370.tar.bz2
gentoo-9388e3a87073ccd03699ab4a39c0f8049841d370.zip
dev-python/pycairo: Skip tests on py2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/pycairo/pycairo-1.18.2.ebuild15
1 files changed, 13 insertions, 2 deletions
diff --git a/dev-python/pycairo/pycairo-1.18.2.ebuild b/dev-python/pycairo/pycairo-1.18.2.ebuild
index b8e47a44e65b..253c565d333d 100644
--- a/dev-python/pycairo/pycairo-1.18.2.ebuild
+++ b/dev-python/pycairo/pycairo-1.18.2.ebuild
@@ -19,8 +19,10 @@ IUSE="examples"
BDEPEND="
test? (
- dev-python/hypothesis[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ ' -3)
)
"
RDEPEND="
@@ -34,6 +36,15 @@ distutils_enable_sphinx docs \
dev-python/sphinx_rtd_theme
distutils_enable_tests setup.py
+python_test() {
+ if ! python_is_python3; then
+ einfo "Skipping tests on Python 2 to unblock deps"
+ return
+ fi
+
+ esetup.py test
+}
+
python_install() {
distutils-r1_python_install \
install_pkgconfig --pkgconfigdir="${EPREFIX}/usr/$(get_libdir)/pkgconfig"