1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
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 )"
18 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
24 dev-python/setuptools[${PYTHON_USEDEP}]
25 test? ( dev-python/nose[${PYTHON_USEDEP}] )"
27 python_prepare_all() {
29 local PATCHES=( "${FILESDIR}"/${P}-doc.patch )
30 mv "${WORKDIR}"/_themes ./docs/ || die
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
36 distutils-r1_python_prepare_all
39 python_compile_all() {
40 use doc && emake -C docs html
44 nosetests || die "Tests fail with ${EPYTHON}"
47 python_install_all() {
48 use doc && local HTML_DOCS=( docs/_build/html/. )
49 distutils-r1_python_install_all