*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / app-text / pytextile / pytextile-2.3.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5 PYTHON_COMPAT=( python{2_7,3_6} )
6
7 inherit distutils-r1
8
9 MY_PN="python-textile"
10 MY_P="${MY_PN}-${PV}"
11
12 DESCRIPTION="A Python port of Textile, A humane web text generator"
13 HOMEPAGE="https://github.com/textile/python-textile"
14 SRC_URI="https://github.com/textile/python-textile/archive/${PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="amd64 ppc ppc64 sparc x86"
19 IUSE="test"
20 RESTRICT="!test? ( test )"
21
22 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
23         dev-python/pytest-runner[${PYTHON_USEDEP}]
24         test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
25 RDEPEND="
26         dev-python/regex[${PYTHON_USEDEP}]
27         "
28
29 S="${WORKDIR}/${MY_P}"
30
31 python_prepare_all() {
32         # This resolves a nasty race condition, courtesy of Arfrever
33         sed -e 's:with-id = 1::' -i setup.cfg || die
34         # remove useless --cov arg injection
35         rm pytest.ini || die
36         distutils-r1_python_prepare_all
37 }
38
39 python_test() {
40         py.test || die "Testsuite failed under ${EPYTHON}"
41 }