1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{5,6,7} )
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"
21 RESTRICT="!test? ( test )"
24 $(python_gen_cond_dep '>=dev-python/cffi-1.1.0:=[${PYTHON_USEDEP}]' 'python*')
25 >=dev-python/xcffib-0.3.2[${PYTHON_USEDEP}]
26 x11-libs/cairo:0=[xcb]
27 x11-libs/gdk-pixbuf[jpeg]
28 $(python_gen_cond_dep '>=virtual/pypy-2.6.0' pypy )"
31 dev-python/setuptools[${PYTHON_USEDEP}]
32 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
35 dev-python/pytest[${PYTHON_USEDEP}]
37 $(python_gen_cond_dep '>=virtual/pypy-2.6.0' pypy )"
40 "${FILESDIR}"/${PN}-0.8.0-tests.patch
41 "${FILESDIR}"/${P}-test-deps.patch
44 S="${WORKDIR}/${MY_P}"
46 python_compile_all() {
47 use doc && esetup.py build_sphinx
51 virtx py.test -v --pyargs cairocffi || die "testsuite failed under ${EPYTHON}"
54 python_install_all() {
55 use doc && HTML_DOCS=( docs/_build/html/. )
56 distutils-r1_python_install_all