3b5031979f802a62629e67dded78e92cc2628991
[gentoo.git] / dev-python / html5lib / html5lib-1.0.1-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python{2_7,3_{6,7,8}} 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 ~sparc ~x86 ~x64-macos"
18 IUSE="test"
19
20 RDEPEND=">=dev-python/six-1.9[${PYTHON_USEDEP}]
21         dev-python/webencodings[${PYTHON_USEDEP}]"
22 BDEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         test? (
25                 dev-python/pytest-expect[${PYTHON_USEDEP}]
26                 dev-python/mock[${PYTHON_USEDEP}]
27         )"
28
29 RESTRICT+=" !test? ( test )"
30
31 PATCHES=(
32         # https://github.com/html5lib/html5lib-python/pull/429
33         "${FILESDIR}/html5lib-python-1.0.1-support-pytest4.patch"
34 )
35
36 distutils_enable_tests pytest