1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
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"
20 KEYWORDS="~alpha amd64 arm ~hppa ia64 ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd"
22 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
24 RDEPEND=">=dev-python/webob-0.9.2[${PYTHON_USEDEP}]"
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}] )"
33 S="${WORKDIR}/${MY_P}"
34 PATCHES=( "${FILESDIR}/webtest-1.4.3-doctest.patch" )
36 python_compile_all() {
38 sphinx-build docs html || die
43 DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test
47 # Tests raise ImportErrors with our default PYTHONPATH.
49 nosetests || die "Tests fail with ${EPYTHON}"
52 python_install_all() {
53 use doc && local HTML_DOCS=( html/. )
54 distutils-r1_python_install_all