summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-01 08:20:25 +0100
committerSam James <sam@gentoo.org>2022-06-01 08:25:35 +0100
commitd173a3f19dec579437be5f5dd139339c22404a8e (patch)
treed2d9ada5b0d3b2a2940899ed6ab44b57d12c64ac /dev-python/dbus-next/dbus-next-0.2.3-r1.ebuild
parentdev-python/starlette: enable py3.11 (diff)
downloadgentoo-d173a3f19dec579437be5f5dd139339c22404a8e.tar.gz
gentoo-d173a3f19dec579437be5f5dd139339c22404a8e.tar.bz2
gentoo-d173a3f19dec579437be5f5dd139339c22404a8e.zip
dev-python/dbus-next: fix test crash w/ Python 3.11
Not yet adding Python 3.11 support though as I get another failure. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/dbus-next/dbus-next-0.2.3-r1.ebuild')
-rw-r--r--dev-python/dbus-next/dbus-next-0.2.3-r1.ebuild46
1 files changed, 46 insertions, 0 deletions
diff --git a/dev-python/dbus-next/dbus-next-0.2.3-r1.ebuild b/dev-python/dbus-next/dbus-next-0.2.3-r1.ebuild
new file mode 100644
index 000000000000..7826aedf1dc8
--- /dev/null
+++ b/dev-python/dbus-next/dbus-next-0.2.3-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1 virtualx
+
+DESCRIPTION="The next great DBus library for Python with asyncio support"
+HOMEPAGE="https://python-dbus-next.readthedocs.io/en/latest/"
+SRC_URI="https://github.com/altdesktop/python-dbus-next/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/python-${P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="test? (
+ dev-python/pygobject[${PYTHON_USEDEP}]
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/pytest-timeout[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.2.3-glib-crash.patch
+)
+
+EPYTEST_IGNORE=(
+ # "interface not found on this object: org.freedesktop.DBus.Debug.Stats"
+ # Seems like we build dbus w/o this?
+ test/client/test_signals.py
+)
+
+distutils_enable_tests pytest
+
+src_test() {
+ local dbus_params=(
+ $(dbus-daemon --session --print-address --fork --print-pid)
+ )
+ local -x DBUS_SESSION_BUS_ADDRESS=${dbus_params[0]}
+
+ virtx distutils-r1_src_test
+
+ kill "${dbus_params[1]}" || die
+}