dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / webob / webob-1.7.4.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
7
8 inherit distutils-r1 versionator
9
10 MY_PN=WebOb
11 MY_P=${MY_PN}-${PV}
12
13 DESCRIPTION="WSGI request and response object"
14 HOMEPAGE="https://webob.org/ https://pypi.python.org/pypi/WebOb"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
16
17 LICENSE="MIT"
18 SLOT="0"
19 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
20 IUSE="doc test"
21
22 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
23         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
24         test? ( dev-python/nose[${PYTHON_USEDEP}]
25                 dev-python/coverage[${PYTHON_USEDEP}] )"
26 RDEPEND=""
27
28 S=${WORKDIR}/${MY_P}
29
30 python_compile_all() {
31         if use doc; then
32                 esetup.py build_sphinx
33         fi
34 }
35
36 python_test() {
37         nosetests --verbose -w tests || die "Tests fail with ${EPYTHON}"
38 }
39
40 python_install_all() {
41         use doc && local HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. )
42         distutils-r1_python_install_all
43 }