summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2020-06-06 19:40:03 +0200
committerPacho Ramos <pacho@gentoo.org>2020-06-06 19:40:28 +0200
commitc9ef6b5d055e9451dc20ea4094d7ba9dc6551b4f (patch)
tree8a6bbc78d1db23a27bb5ee651378159f0dc9fc1a /dev-python/cairocffi
parentdev-util/google-perftools: x86 stable wrt bug #727264 (diff)
downloadgentoo-c9ef6b5d055e9451dc20ea4094d7ba9dc6551b4f.tar.gz
gentoo-c9ef6b5d055e9451dc20ea4094d7ba9dc6551b4f.tar.bz2
gentoo-c9ef6b5d055e9451dc20ea4094d7ba9dc6551b4f.zip
dev-python/cairocffi: Support newer python
This allows consumers needing python2 support to coexist with packages needed newer python. By the way, also apply the patch that is used in 0.8 and 1.1 versions to workaround broken tests. Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Pacho Ramos <pacho@gentoo.org>
Diffstat (limited to 'dev-python/cairocffi')
-rw-r--r--dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild21
1 files changed, 11 insertions, 10 deletions
diff --git a/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild b/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild
index 45e349b58087..6793e7f9b0ea 100644
--- a/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild
+++ b/dev-python/cairocffi/cairocffi-0.9.0-r1.ebuild
@@ -3,7 +3,7 @@
EAPI="7"
-PYTHON_COMPAT=( python2_7 python3_{6,7} )
+PYTHON_COMPAT=( python2_7 python3_{6..9} )
inherit distutils-r1 virtualx
@@ -17,9 +17,11 @@ SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
-IUSE="doc test"
+IUSE="test"
RESTRICT="!test? ( test )"
+distutils_enable_sphinx docs
+
RDEPEND="
$(python_gen_cond_dep '>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]' 'python*')
>=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}]
@@ -28,7 +30,6 @@ RDEPEND="
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
test? (
${RDEPEND}
dev-python/pytest[${PYTHON_USEDEP}]
@@ -36,15 +37,15 @@ DEPEND="
S="${WORKDIR}/${MY_P}"
-python_compile_all() {
- use doc && esetup.py build_sphinx
+PATCHES=( "${FILESDIR}"/${PN}-0.8.0-tests.patch )
+
+python_prepare() {
+ if python_is_python3; then
+ # Remove deprecated statements for python3
+ sed -i -e 's/tostring/tobytes/g' cairocffi/test_cairo.py || die
+ fi
}
python_test() {
virtx py.test -v --pyargs cairocffi -o addopts=
}
-
-python_install_all() {
- use doc && HTML_DOCS=( docs/_build/html/. )
- distutils-r1_python_install_all
-}