webtest-*.ebuild: Install lint3 for Python 3
[wtk-overlay.git] / webtest-2.0.11.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="~amd64 ~x86"
21 IUSE="doc test"
22
23 RDEPEND="
24         dev-python/six[${PYTHON_USEDEP}]
25         >=dev-python/waitress-0.8.5[${PYTHON_USEDEP}]
26         >=dev-python/webob-0.9.2[${PYTHON_USEDEP}]
27         dev-python/beautifulsoup:4[${PYTHON_USEDEP}]
28         python_targets_python2_6? ( dev-python/ordereddict[python_targets_python2_6] )
29 "
30 DEPEND="${RDEPEND}
31         app-arch/unzip
32         dev-python/setuptools[${PYTHON_USEDEP}]
33         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
34         test? ( dev-python/nose[${PYTHON_USEDEP}]
35                 dev-python/pyquery[${PYTHON_USEDEP}]
36                 dev-python/pastedeploy[${PYTHON_USEDEP}]
37                 dev-python/wsgiproxy2[${PYTHON_USEDEP}]
38                 virtual/python-unittest2[${PYTHON_USEDEP}]
39         )"
40
41 S="${WORKDIR}/${MY_P}"
42
43 # Makes testing easier; otherwise we get errors from pkg_resources.
44 DISTUTILS_IN_SOURCE_BUILD=1
45
46 python_compile_all() {
47         if use doc; then
48                 sphinx-build docs html || die
49         fi
50 }
51
52 src_test() {
53         DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
54 }
55
56 python_test() {
57         # Tests raise ImportErrors with our default PYTHONPATH.
58         local -x PYTHONPATH=
59         nosetests || die "Tests fail with ${EPYTHON}"
60 }
61
62 python_install_all() {
63         use doc && local HTML_DOCS=( html/. )
64         distutils-r1_python_install_all
65 }