c104dbfa88387360808f2150e894551c323582ff
[gentoo.git] / dev-python / html5lib / html5lib-0.9999999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 python3_{5,6} pypy pypy3 )
7 PYTHON_REQ_USE="xml(+)"
8
9 inherit distutils-r1
10
11 DESCRIPTION="HTML parser based on the HTML5 specification"
12 HOMEPAGE="https://github.com/html5lib/html5lib-python/ https://html5lib.readthedocs.org"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
20
21 RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
25
26 python_test() {
27         # https://github.com/html5lib/html5lib-python/issues/224
28         # https://bugs.gentoo.org/show_bug.cgi?id=571644
29         has_version =dev-python/lxml-3.5.0 && \
30                 einfo "test are broken with dev-python/lxml-3.5.0" && \
31                 einfo "https://github.com/html5lib/html5lib-python/issues/224" && \
32                 return
33         nosetests --verbosity=3 || die "Tests fail with ${EPYTHON}"
34 }