Stable for sparc, wrt bug #450174
[wtk-overlay.git] / webtest-1.4.3-r1.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
8
9 inherit distutils-r1
10
11 MY_PN="WebTest"
12 MY_P="${MY_PN}-${PV}"
13
14 DESCRIPTION="Helper to test WSGI applications"
15 HOMEPAGE="http://pythonpaste.org/webtest/ http://pypi.python.org/pypi/WebTest"
16 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
17
18 LICENSE="MIT"
19 SLOT="0"
20 KEYWORDS="~alpha amd64 ~arm ~hppa ia64 ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd"
21 IUSE="doc test"
22
23 RDEPEND=">=dev-python/webob-0.9.2[${PYTHON_USEDEP}]"
24 DEPEND="${RDEPEND}
25         app-arch/unzip
26         dev-python/setuptools[${PYTHON_USEDEP}]
27         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
28         test? ( dev-python/nose[${PYTHON_USEDEP}]
29                 dev-python/pyquery[${PYTHON_USEDEP}] )"
30
31 S="${WORKDIR}/${MY_P}"
32
33 python_compile_all() {
34         if use doc; then
35                 sphinx-build docs html || die
36         fi
37 }
38
39 python_test() {
40         nosetests || die "Tests fail with ${EPYTHON}"
41 }
42
43 python_install() {
44         distutils-r1_python_install
45
46         if [[ ${EPYTHON} == python3* ]]; then
47                 rm -f "${D}$(python_get_sitedir)"/webtest/lint3.py
48         fi
49 }
50
51 python_install_all() {
52         use doc && local HTML_DOCS=( html/. )
53         distutils-r1_python_install_all
54 }