dev-python/dbus-python: ppc stable wrt bug #714306
[gentoo.git] / dev-python / dbus-python / dbus-python-1.2.14.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
7 PYTHON_REQ_USE="threads(+)"
8
9 inherit autotools python-r1
10
11 DESCRIPTION="Python bindings for the D-Bus messagebus"
12 HOMEPAGE="https://www.freedesktop.org/wiki/Software/DBusBindings https://dbus.freedesktop.org/doc/dbus-python/"
13 SRC_URI="https://dbus.freedesktop.org/releases/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ~ppc64 ~s390 sparc x86"
18
19 IUSE="doc examples test"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
21
22 RESTRICT="!test? ( test )"
23
24 RDEPEND="${PYTHON_DEPS}
25         >=sys-apps/dbus-1.8:=
26         >=dev-libs/glib-2.40
27 "
28 DEPEND="${RDEPEND}"
29 BDEPEND="
30         virtual/pkgconfig
31         doc? ( $(python_gen_any_dep 'dev-python/sphinx[${PYTHON_USEDEP}]') )
32         test? ( dev-python/pygobject:3[${PYTHON_USEDEP}]
33                 dev-python/tappy[${PYTHON_USEDEP}] )
34 "
35
36 python_check_deps() {
37         has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
38 }
39
40 src_prepare() {
41         default
42         # Update py-compile, bug 529502.
43         eautoreconf
44         python_copy_sources
45 }
46
47 src_configure() {
48         use doc && python_setup
49         local SPHINX_IMPL=${EPYTHON}
50
51         configuring() {
52                 local myconf=(
53                         --disable-documentation
54                 )
55                 [[ ${EPYTHON} == ${SPHINX_IMPL} ]] &&
56                         myconf+=( --enable-documentation )
57
58                 econf "${myconf[@]}"
59         }
60         python_foreach_impl run_in_build_dir configuring
61 }
62
63 src_compile() {
64         python_foreach_impl run_in_build_dir default
65 }
66
67 src_test() {
68         unset DBUS_SESSION_BUS_ADDRESS
69         python_foreach_impl run_in_build_dir default
70 }
71
72 src_install() {
73         python_foreach_impl run_in_build_dir default
74         find "${D}" -name '*.la' -type f -delete || die
75
76         use examples && dodoc -r examples
77 }