1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( pypy3 python3_{6,7} )
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"
15 KEYWORDS="~amd64 ~ppc ~sparc ~x86"
17 RESTRICT="!test? ( test )"
19 # pkg_resources is used for entry points
20 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
22 dev-python/setuptools[${PYTHON_USEDEP}]
23 test? ( dev-python/pytest[${PYTHON_USEDEP}] )
26 DOCS=( AUTHORS.rst ChangeLog.rst README.md )
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
35 pytest -vv || die "tests failed with ${EPYTHON}"