1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy )
10 DESCRIPTION="A logging replacement for Python"
11 HOMEPAGE="http://packages.python.org/Logbook/ https://pypi.python.org/pypi/Logbook"
12 SRC_URI="https://github.com/mitsuhiko/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86"
18 DISTUTILS_IN_SOURCE_BUILD=1
21 dev-python/setuptools[${PYTHON_USEDEP}]
22 test? ( dev-python/pytest[${PYTHON_USEDEP}] )
23 doc? ( >=dev-python/sphinx-1.1.3-r3[${PYTHON_USEDEP}] )"
24 RDEPEND="dev-python/redis-py[${PYTHON_USEDEP}]"
26 PATCHES=( "${FILESDIR}"/${PN}-0.4.2-objectsinv.patch )
28 python_prepare_all() {
29 # Delete test file requiring local connection to redis server
30 rm tests/test_queues.py || die
31 distutils-r1_python_prepare_all
34 python_compile_all() {
35 use doc && emake -C docs html
39 py.test tests || die "Tests failed under ${EPYTHON}"
42 python_install_all() {
43 use doc && HTML_DOCS=( docs/_build/html/. )
44 distutils-r1_python_install_all