Use https by default
[gentoo.git] / dev-python / waitress / waitress-0.8.9.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
8
9 inherit distutils-r1
10
11 DESCRIPTION="A pure-Python WSGI server"
12 HOMEPAGE="http://docs.pylonsproject.org/projects/waitress/en/latest/ https://pypi.python.org/pypi/waitress/ https://github.com/Pylons/waitress"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz \
14                 doc? ( https://dev.gentoo.org/~idella4/pylons_sphinx_theme.tar.gz )"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
19 IUSE="doc test"
20
21 RDEPEND=""
22 DEPEND="${RDEPEND}
23         app-arch/unzip
24         dev-python/setuptools[${PYTHON_USEDEP}]
25         test? ( dev-python/nose[${PYTHON_USEDEP}] )"
26
27 python_prepare_all() {
28         if use doc; then
29                 local PATCHES=( "${FILESDIR}"/${P}-doc.patch )
30                 mv "${WORKDIR}"/_themes ./docs/ || die
31         fi
32
33         # Fix generation of documentation with Waitress not installed. Bug #525384
34         sed -e "s/^version = pkg_resources.get_distribution('waitress').version$/version = '${PV}'/" -i docs/conf.py
35
36         distutils-r1_python_prepare_all
37 }
38
39 python_compile_all() {
40         use doc && emake -C docs html
41 }
42
43 python_test() {
44         nosetests || die "Tests fail with ${EPYTHON}"
45 }
46
47 python_install_all() {
48         use doc && local HTML_DOCS=( docs/_build/html/. )
49         distutils-r1_python_install_all
50 }