*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / html2text / html2text-2019.9.26.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( pypy3 python3_{6,7} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Turn HTML into equivalent Markdown-structured text"
10 HOMEPAGE="https://github.com/Alir3z4/html2text https://pypi.org/project/html2text/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-3"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 # pkg_resources is used for entry points
20 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
21 DEPEND="
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         test? ( dev-python/pytest[${PYTHON_USEDEP}] )
24 "
25
26 DOCS=( AUTHORS.rst ChangeLog.rst README.md )
27
28 python_prepare_all() {
29         # naming conflict with app-text/html2text, bug 421647
30         sed -i 's/html2text = html2text.cli:main/py\0/' setup.py || die
31         distutils-r1_python_prepare_all
32 }
33
34 python_test() {
35         pytest -vv || die "tests failed with ${EPYTHON}"
36 }