commit:     5d977ed349465ab3cdc376194d03424cbb2cb9c8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 15 05:00:20 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 18 04:39:07 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d977ed3

distutils-r1.eclass: Skip dep on ${PN} in EPYTEST_PLUGINS

When `EPYTEST_PLUGINS` contains `${PN}`, skip it when adding
dependencies.  This avoids a self-dependency, while making it possible
to easily test pytest plugins themselves without having to append to
`EPYTEST_PLUGINS` locally.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/43007
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/distutils-r1.eclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index b9366d187555..7b025261eb2b 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -565,6 +565,10 @@ distutils_enable_tests() {
                        _set_epytest_plugins
                        for plugin in "${EPYTEST_PLUGINS[@]}"; do
                                case ${plugin} in
+                                       ${PN})
+                                               # don't add a dependency on self
+                                               continue
+                                               ;;
                                        pkgcore)
                                                plugin=sys-apps/${plugin}
                                                ;;

Reply via email to