kde-misc/kdiff3: use HTTPS for links to dev.gentoo.org
[gentoo.git] / dev-python / logbook / logbook-1.0.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python{2_7,3_{4,5,6}} pypy )
7
8 inherit distutils-r1
9
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"
13
14 LICENSE="BSD"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="doc test"
18 DISTUTILS_IN_SOURCE_BUILD=1
19
20 DEPEND="
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}]"
25
26 PATCHES=( "${FILESDIR}"/${PN}-0.4.2-objectsinv.patch )
27
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
32 }
33
34 python_compile_all() {
35         use doc && emake -C docs html
36 }
37
38 python_test() {
39         py.test tests || die "Tests failed under ${EPYTHON}"
40 }
41
42 python_install_all() {
43         use doc && HTML_DOCS=( docs/_build/html/. )
44         distutils-r1_python_install_all
45 }