commit: bba723505f488b52bd593869b5b9a0df096ffbb4 Author: Michal Privoznik <michal.privoznik <AT> gmail <DOT> com> AuthorDate: Sat May 25 16:40:56 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue May 28 01:51:21 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bba72350
app-emulation/libvirt: Drag in dev-python/pytest As of its upstream commit v9.10.0-rc1~114 libvirt introduced its own RPC generator written in python and also some tests for it. But these require pytest. Therefore, generate corresponding dependency if running tests. Closes: https://bugs.gentoo.org/932652 Signed-off-by: Michal Privoznik <michal.privoznik <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36814 Signed-off-by: Sam James <sam <AT> gentoo.org> app-emulation/libvirt/libvirt-10.0.0-r2.ebuild | 10 ++++++++++ app-emulation/libvirt/libvirt-10.1.0-r1.ebuild | 10 ++++++++++ app-emulation/libvirt/libvirt-10.2.0.ebuild | 10 ++++++++++ app-emulation/libvirt/libvirt-10.3.0-r1.ebuild | 10 ++++++++++ app-emulation/libvirt/libvirt-9999.ebuild | 10 ++++++++++ 5 files changed, 50 insertions(+) diff --git a/app-emulation/libvirt/libvirt-10.0.0-r2.ebuild b/app-emulation/libvirt/libvirt-10.0.0-r2.ebuild index baf260598704..6ef0ed221ed8 100644 --- a/app-emulation/libvirt/libvirt-10.0.0-r2.ebuild +++ b/app-emulation/libvirt/libvirt-10.0.0-r2.ebuild @@ -136,6 +136,11 @@ DEPEND=" ${BDEPEND} ${RDEPEND} ${PYTHON_DEPS} + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) " # The 'circular' dependency on dev-python/libvirt-python is because of # virt-qemu-qmp-proxy. @@ -151,6 +156,11 @@ PATCHES=( "${FILESDIR}"/${PN}-10.2.0-remote-check-for-negative-array-lengths-before-alloc.patch ) +python_check_deps() { + use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]" + return 0 +} + pkg_setup() { # Check kernel configuration: CONFIG_CHECK="" diff --git a/app-emulation/libvirt/libvirt-10.1.0-r1.ebuild b/app-emulation/libvirt/libvirt-10.1.0-r1.ebuild index 128f76475972..09744fc00680 100644 --- a/app-emulation/libvirt/libvirt-10.1.0-r1.ebuild +++ b/app-emulation/libvirt/libvirt-10.1.0-r1.ebuild @@ -136,6 +136,11 @@ DEPEND=" ${BDEPEND} ${RDEPEND} ${PYTHON_DEPS} + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) " # The 'circular' dependency on dev-python/libvirt-python is because of # virt-qemu-qmp-proxy. @@ -150,6 +155,11 @@ PATCHES=( "${FILESDIR}"/${PN}-10.2.0-remote-check-for-negative-array-lengths-before-alloc.patch ) +python_check_deps() { + use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]" + return 0 +} + pkg_setup() { # Check kernel configuration: CONFIG_CHECK="" diff --git a/app-emulation/libvirt/libvirt-10.2.0.ebuild b/app-emulation/libvirt/libvirt-10.2.0.ebuild index f1c08714d713..b02aa7c5b956 100644 --- a/app-emulation/libvirt/libvirt-10.2.0.ebuild +++ b/app-emulation/libvirt/libvirt-10.2.0.ebuild @@ -136,6 +136,11 @@ DEPEND=" ${BDEPEND} ${RDEPEND} ${PYTHON_DEPS} + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) " # The 'circular' dependency on dev-python/libvirt-python is because of # virt-qemu-qmp-proxy. @@ -149,6 +154,11 @@ PATCHES=( "${FILESDIR}"/${PN}-9.6.0-fix-paths-for-apparmor.patch ) +python_check_deps() { + use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]" + return 0 +} + pkg_setup() { # Check kernel configuration: CONFIG_CHECK="" diff --git a/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild b/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild index 5a6a2ae58357..8a163a2b46ac 100644 --- a/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild +++ b/app-emulation/libvirt/libvirt-10.3.0-r1.ebuild @@ -136,6 +136,11 @@ DEPEND=" ${BDEPEND} ${RDEPEND} ${PYTHON_DEPS} + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) " # The 'circular' dependency on dev-python/libvirt-python is because of # virt-qemu-qmp-proxy. @@ -150,6 +155,11 @@ PATCHES=( "${FILESDIR}"/${PN}-10.3.0-vsh-Don-t-init-history-in-cmdComplete.patch ) +python_check_deps() { + use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]" + return 0 +} + pkg_setup() { # Check kernel configuration: CONFIG_CHECK="" diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild index f1c08714d713..b02aa7c5b956 100644 --- a/app-emulation/libvirt/libvirt-9999.ebuild +++ b/app-emulation/libvirt/libvirt-9999.ebuild @@ -136,6 +136,11 @@ DEPEND=" ${BDEPEND} ${RDEPEND} ${PYTHON_DEPS} + test? ( + $(python_gen_any_dep ' + dev-python/pytest[${PYTHON_USEDEP}] + ') + ) " # The 'circular' dependency on dev-python/libvirt-python is because of # virt-qemu-qmp-proxy. @@ -149,6 +154,11 @@ PATCHES=( "${FILESDIR}"/${PN}-9.6.0-fix-paths-for-apparmor.patch ) +python_check_deps() { + use test && python_has_version -d "dev-python/pytest[${PYTHON_USEDEP}]" + return 0 +} + pkg_setup() { # Check kernel configuration: CONFIG_CHECK=""
