1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{5,6} pypy pypy3 )
13 DESCRIPTION="Provides pythonic idioms for iterating, searching, and modifying an HTML/XML parse tree"
14 HOMEPAGE="https://bugs.launchpad.net/beautifulsoup/
15 https://pypi.org/project/beautifulsoup4/"
16 SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
20 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
23 RESTRICT="!test? ( test )"
25 # html5lib is optional however hard coding since its use is actively discouraged in the devmanual
27 $(python_gen_cond_dep 'dev-python/html5lib[${PYTHON_USEDEP}]' python2_7 pypy)
28 $(python_gen_cond_dep 'dev-python/lxml[${PYTHON_USEDEP}]' python2_7 'python3*')"
30 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
31 test? ( dev-python/nose[${PYTHON_USEDEP}] )
36 python_compile_all() {
37 use doc && emake -C doc html
41 nosetests --verbose -w "${BUILD_DIR}"/lib || die "Tests fail with ${EPYTHON}"
44 python_install_all() {
45 use doc && local HTML_DOCS=( doc/build/html/. )
46 distutils-r1_python_install_all