dev-python/beautifulsoup: ppc64 stable wrt bug #589576
[gentoo.git] / dev-python / beautifulsoup / beautifulsoup-4.5.1.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=6
6
7 PYTHON_COMPAT=( python2_7 python3_{4,5} pypy pypy3 )
8
9 inherit distutils-r1
10
11 MY_PN=${PN}4
12 MY_P=${MY_PN}-${PV}
13
14 DESCRIPTION="Provides pythonic idioms for iterating, searching, and modifying an HTML/XML parse tree"
15 HOMEPAGE="https://bugs.launchpad.net/beautifulsoup/
16         https://pypi.python.org/pypi/beautifulsoup4"
17 SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz"
18
19 LICENSE="MIT"
20 SLOT="4"
21 KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
22
23 IUSE="doc test"
24
25 # html5lib is optional however hard coding since its use is actively discouraged in the devmanual
26 RDEPEND="
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*')"
29 DEPEND="
30         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
31         test? ( dev-python/nose[${PYTHON_USEDEP}] )
32         "
33
34 S=${WORKDIR}/${MY_P}
35
36 python_compile_all() {
37         use doc && emake -C doc html
38 }
39
40 python_test() {
41         nosetests --verbose -w "${BUILD_DIR}"/lib || die "Tests fail with ${EPYTHON}"
42 }
43
44 python_install_all() {
45         use doc && local HTML_DOCS=( doc/build/html/. )
46         distutils-r1_python_install_all
47 }