Merge branch 'gentoo-bug-542168' of git://github.com/Whissi/gentoo
[gentoo.git] / app-text / pytextile / pytextile-2.2.2.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
7
8 inherit distutils-r1
9
10 MY_PN="textile"
11 MY_P="${MY_PN}-${PV}"
12
13 DESCRIPTION="A Python implementation of Textile, Dean Allen's Human Text Generator for creating (X)HTML"
14 HOMEPAGE="https://github.com/textile/python-textile"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="~amd64 ~ppc64 ~x86"
20 IUSE="test"
21
22 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
23         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
24 RDEPEND="
25         dev-python/regex[${PYTHON_USEDEP}]"
26
27 S="${WORKDIR}/${MY_P}"
28
29 python_prepare_all() {
30         # This resolves a nasty race condition, courtesy of Arfrever
31         sed -e 's:with-id = 1::' -i setup.cfg || die
32         distutils-r1_python_prepare_all
33 }
34
35 python_test() {
36         nosetests textile/tests/ || die "Tests failed under ${EPYTHON}"
37 }