*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / commonmark / commonmark-0.8.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python{2_7,3_6,3_7} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Python parser for the CommonMark Markdown spec"
10 HOMEPAGE="https://github.com/rtfd/CommonMark-py"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         dev-python/future[${PYTHON_USEDEP}]
21 "
22 DEPEND="${RDEPEND}
23         test? (
24                 >=dev-python/hypothesis-3.7.1[${PYTHON_USEDEP}]
25         )
26         dev-python/setuptools[${PYTHON_USEDEP}]
27 "
28
29 python_test() {
30         PYTHONIOENCODING='utf8' \
31         esetup.py test
32 }
33
34 src_prepare() {
35         default
36         # Fix file collision with app-text/cmark, see bug #627034
37         sed -i -e "s:'cmark\( = commonmark.cmark\:main'\):'cmark.py\1:" \
38                 setup.py || die
39 }
40
41 pkg_postinst() {
42         ewarn "/usr/bin/cmark has been renamed to /usr/bin/cmark.py due file"
43         ewarn "collision with app-text/cmark (see bug #627034)"
44 }