diff options
author | Sam James <sam@gentoo.org> | 2023-02-17 07:36:13 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-02-17 07:36:13 +0000 |
commit | c65ce96143a9356d22020969f661c8a268a02673 (patch) | |
tree | f5a892296ce84e39441da0e4cfa5b9347a0a91b2 /dev-python/pyalsa | |
parent | dev-python/prov: update SRC_URI (diff) | |
download | gentoo-c65ce96143a9356d22020969f661c8a268a02673.tar.gz gentoo-c65ce96143a9356d22020969f661c8a268a02673.tar.bz2 gentoo-c65ce96143a9356d22020969f661c8a268a02673.zip |
dev-python/pyalsa: enable py3.11, wire up test infra
Can't run tests in sandbox though.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/pyalsa')
-rw-r--r-- | dev-python/pyalsa/pyalsa-1.2.7.ebuild | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/dev-python/pyalsa/pyalsa-1.2.7.ebuild b/dev-python/pyalsa/pyalsa-1.2.7.ebuild index 9d79adb5891d..3840bf92b6eb 100644 --- a/dev-python/pyalsa/pyalsa-1.2.7.ebuild +++ b/dev-python/pyalsa/pyalsa-1.2.7.ebuild @@ -3,9 +3,9 @@ EAPI=8 -PYTHON_COMPAT=( python3_{9..10} ) +PYTHON_COMPAT=( python3_{9..11} ) -inherit distutils-r1 flag-o-matic +inherit distutils-r1 DESCRIPTION="Python bindings for ALSA library" HOMEPAGE="https://alsa-project.org/wiki/Main_Page" @@ -14,7 +14,8 @@ SRC_URI="https://www.alsa-project.org/files/pub/pyalsa/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86" -IUSE="" +# Needs access to system's alsa configuration/devices +RESTRICT="test" RDEPEND="media-libs/alsa-lib" DEPEND="${RDEPEND} @@ -22,4 +23,22 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${PN}-1.1.6-no-build-symlinks.patch" ) -# Testsuite appears to require installed state +python_test() { + cd "${T}" || die + + shopt -s nullglob + local test + local failed + for test in "${S}"/test/*.py ; do + ${EPYTHON} "${test}" || { + eerror "${test} failed with ${EPYTHON}" + failed=1 + break + } + done + shopt -u nullglob + + if [[ ${failed} -eq 1 ]] ; then + die "${test} failed with ${EPYTHON}" + fi +} |