webtest-*.ebuild: Install lint3 for Python 3
[wtk-overlay.git] / webtest-1.4.3-r1.ebuild
1 # Copyright 1999-2014 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 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
23
24 RDEPEND=">=dev-python/webob-0.9.2[${PYTHON_USEDEP}]"
25 DEPEND="${RDEPEND}
26         app-arch/unzip
27         dev-python/setuptools[${PYTHON_USEDEP}]
28         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
29         test? ( dev-python/nose[${PYTHON_USEDEP}]
30                 dev-python/pyquery[${PYTHON_USEDEP}]
31                 virtual/python-unittest2[${PYTHON_USEDEP}] )"
32
33 S="${WORKDIR}/${MY_P}"
34 PATCHES=( "${FILESDIR}/webtest-1.4.3-doctest.patch" )
35
36 python_compile_all() {
37         if use doc; then
38                 sphinx-build docs html || die
39         fi
40 }
41
42 src_test() {
43         DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
44 }
45
46 python_test() {
47         # Tests raise ImportErrors with our default PYTHONPATH.
48         unset PYTHONPATH
49         nosetests || die "Tests fail with ${EPYTHON}"
50 }
51
52 python_install_all() {
53         use doc && local HTML_DOCS=( html/. )
54         distutils-r1_python_install_all
55 }