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} )
10 DESCRIPTION="parses CSS3 Selectors and translates them to XPath 1.0"
11 HOMEPAGE="https://cssselect.readthedocs.io/en/latest/
12 https://pypi.python.org/pypi/cssselect"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
17 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
21 dev-python/setuptools[${PYTHON_USEDEP}]
22 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
23 test? ( dev-python/lxml[${PYTHON_USEDEP}] )"
26 python_prepare_all() {
27 # prevent non essential d'load of files in doc build
28 sed -e 's:intersphinx_:#&:' -i docs/conf.py || die
29 distutils-r1_python_prepare_all
32 python_compile_all() {
34 "${PYTHON}" setup.py build_sphinx || die
39 "${PYTHON}" ${PN}/tests.py -v || die "Tests fail with ${EPYTHON}"
42 python_install_all() {
43 use doc && local HTML_DOCS=( docs/_build/html/. )
44 distutils-r1_python_install_all