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 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-fbsd"
20 # No tests.py file in this release.
21 # Please check on version bumps if it's still missing.
25 dev-python/setuptools[${PYTHON_USEDEP}]
26 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
27 test? ( dev-python/lxml[${PYTHON_USEDEP}] )"
31 python_prepare_all() {
32 # prevent non essential d'load of files in doc build
33 sed -e 's:intersphinx_:#&:' -i docs/conf.py || die
34 distutils-r1_python_prepare_all
37 python_compile_all() {
39 "${PYTHON}" setup.py build_sphinx || die
44 "${PYTHON}" ${PN}/tests.py -v || die "Tests fail with ${EPYTHON}"
47 python_install_all() {
48 use doc && local HTML_DOCS=( docs/_build/html/. )
49 distutils-r1_python_install_all