1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
8 inherit distutils-r1 virtualx
13 DESCRIPTION="CFFI-based drop-in replacement for Pycairo"
14 HOMEPAGE="https://github.com/Kozea/cairocffi"
15 SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
19 KEYWORDS="amd64 ~arm ~arm64 ~ppc ppc64 x86"
23 $(python_gen_cond_dep '>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]' 'python*')
24 >=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}]
25 x11-libs/cairo:0=[xcb]
26 x11-libs/gdk-pixbuf[jpeg]
27 $(python_gen_cond_dep '>=virtual/pypy-2.6.0' pypy )"
30 dev-python/setuptools[${PYTHON_USEDEP}]
31 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
34 dev-python/pytest[${PYTHON_USEDEP}]
36 $(python_gen_cond_dep '>=virtual/pypy-2.6.0' pypy )"
38 PATCHES=( "${FILESDIR}"/${P}-tests.patch )
40 S="${WORKDIR}/${MY_P}"
42 python_compile_all() {
43 use doc && esetup.py build_sphinx
47 virtx py.test -v --pyargs cairocffi || die "testsuite failed under ${EPYTHON}"
50 python_install_all() {
51 use doc && HTML_DOCS=( docs/_build/html/. )
52 distutils-r1_python_install_all