# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) inherit distutils-r1 DESCRIPTION="A library to extract data from HTML and XML using XPath and CSS selectors" HOMEPAGE="https://github.com/scrapy/parsel" SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doc test" RDEPEND=" >=dev-python/six-1.9.0[${PYTHON_USEDEP}] >=dev-python/lxml-3.4.4[${PYTHON_USEDEP}] >=dev-python/cssselect-0.9.1[${PYTHON_USEDEP}] >=dev-python/w3lib-1.17.0[${PYTHON_USEDEP}]" DEPEND=" dev-python/setuptools[${PYTHON_USEDEP}] doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) test? ( dev-python/pytest-runner[${PYTHON_USEDEP}] )" python_prepare_all() { # prevent non essential d'load of files in doc build sed -e 's:intersphinx_:#&:' -i docs/conf.py || die distutils-r1_python_prepare_all } python_compile_all() { if use doc; then esetup.py build_sphinx || die HTML_DOCS=( docs/_build/html/. ) fi }