diff options
author | Sam James <sam@gentoo.org> | 2022-04-29 09:12:07 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-04-29 09:13:35 +0100 |
commit | 3e2c5fa402036e2953057cd98cd80a71565dc3ce (patch) | |
tree | eed28592802e3ab47edbe12cb5646992565d53d6 /sys-power | |
parent | app-text/po4a: keyword 0.66 for ~loong (diff) | |
download | gentoo-3e2c5fa402036e2953057cd98cd80a71565dc3ce.tar.gz gentoo-3e2c5fa402036e2953057cd98cd80a71565dc3ce.tar.bz2 gentoo-3e2c5fa402036e2953057cd98cd80a71565dc3ce.zip |
sys-power/upower: fix tests
Closes: https://bugs.gentoo.org/836269
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/upower/upower-0.99.17.ebuild | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sys-power/upower/upower-0.99.17.ebuild b/sys-power/upower/upower-0.99.17.ebuild index 3e2e50731bc6..c1206d3987ed 100644 --- a/sys-power/upower/upower-0.99.17.ebuild +++ b/sys-power/upower/upower-0.99.17.ebuild @@ -3,7 +3,8 @@ EAPI=8 -inherit meson systemd udev xdg-utils +PYTHON_COMPAT=( python3_{8..10} ) +inherit meson python-any-r1 systemd udev xdg-utils DESCRIPTION="D-Bus abstraction for enumerating power devices, querying history and statistics" HOMEPAGE="https://upower.freedesktop.org/" @@ -14,7 +15,8 @@ SLOT="0/3" # based on SONAME of libupower-glib.so KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" # gtk-doc files are not available as prebuilt in the tarball -IUSE="doc +introspection ios selinux" +IUSE="doc +introspection ios selinux test" +RESTRICT="!test? ( test )" DEPEND=" >=dev-libs/glib-2.56:2 @@ -39,6 +41,13 @@ BDEPEND=" >=sys-devel/gettext-0.19.8 virtual/pkgconfig doc? ( dev-util/gtk-doc ) + test? ( + $(python_gen_any_dep ' + dev-python/dbus-python[${PYTHON_USEDEP}] + dev-python/python-dbusmock[${PYTHON_USEDEP}] + ') + dev-util/umockdev + ) " S="${WORKDIR}/${PN}-v${PV}" @@ -49,6 +58,15 @@ PATCHES=( "${FILESDIR}"/${P}-meson-Don-t-search-for-gtk-doc-if-disabled.patch ) +python_check_deps() { + python_has_version -b "dev-python/dbus-python[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/python-dbusmock[${PYTHON_USEDEP}]" +} + +pkg_setup() { + use test && python-any-r1_pkg_setup +} + src_prepare() { default xdg_environment_reset |