Add missing deps.
[wtk-overlay.git] / webtest-1.3.3.ebuild
1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 #Needed by sys-cluster/keystone[test]
6
7 EAPI="3"
8 PYTHON_DEPEND="2:2.6 3:3.2"
9 SUPPORT_PYTHON_ABIS="1"
10 RESTRICT_PYTHON_ABIS="2.5 3.1"
11 PYTHON_TESTS_RESTRICTED_ABIS="*-pypy-*"
12 DISTUTILS_SRC_TEST="nosetests"
13
14 inherit distutils eutils
15
16 MY_PN="WebTest"
17 MY_P="${MY_PN}-${PV}"
18
19 DESCRIPTION="Helper to test WSGI applications"
20 HOMEPAGE="http://pythonpaste.org/webtest/ http://pypi.python.org/pypi/WebTest"
21 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
22
23 LICENSE="MIT"
24 SLOT="0"
25 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
26 IUSE="doc"
27
28 RDEPEND=">=dev-python/webob-0.9.2"
29 DEPEND="${RDEPEND}
30         dev-python/setuptools
31         doc? ( dev-python/sphinx )
32         test? ( dev-python/pyquery )"
33
34 S="${WORKDIR}/${MY_P}"
35
36 src_prepare() {
37         epatch "${FILESDIR}/${PN}-1.3.4-index_fixt.patch"
38         distutils_src_prepare
39 }
40
41 src_compile() {
42         distutils_src_compile
43
44         if use doc; then
45                 einfo "Generation of documentation"
46                 sphinx-build docs html || die "Building of documentation failed"
47         fi
48 }
49
50 src_install() {
51         distutils_src_install
52
53         # Avoid future-import bug on py2.5.* - lint3 is py3 anyway
54         delete_lint3() {
55                 [[ "${PYTHON_ABI}" == 3.* ]] && return
56                 rm "${ED}$(python_get_sitedir)/webtest/lint3.py"
57         }
58         python_execute_function -q delete_lint3
59
60         if use doc; then
61                 dohtml -r html/*
62         fi
63 }