1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
7 PYTHON_REQ_USE="threads(+)"
9 inherit autotools python-r1
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"
17 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
19 IUSE="doc examples test"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
22 RESTRICT="!test? ( test )"
24 RDEPEND="${PYTHON_DEPS}
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}] )
37 has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
42 # Update py-compile, bug 529502.
48 use doc && python_setup
49 local SPHINX_IMPL=${EPYTHON}
53 --disable-documentation
55 [[ ${EPYTHON} == ${SPHINX_IMPL} ]] &&
56 myconf+=( --enable-documentation )
60 python_foreach_impl run_in_build_dir configuring
64 python_foreach_impl run_in_build_dir default
68 unset DBUS_SESSION_BUS_ADDRESS
69 python_foreach_impl run_in_build_dir default
73 python_foreach_impl run_in_build_dir default
74 find "${D}" -name '*.la' -type f -delete || die
76 use examples && dodoc -r examples