commit:     9218c65d0d52d3e64788aebed50649285d268283
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 24 10:01:43 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 24 10:02:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9218c65d

dev-python/selenium: Fix building without tests

Closes: https://bugs.gentoo.org/956553
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/selenium/selenium-4.33.0.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev-python/selenium/selenium-4.33.0.ebuild 
b/dev-python/selenium/selenium-4.33.0.ebuild
index 1fbe3f87abc4..8e51fc2bb379 100644
--- a/dev-python/selenium/selenium-4.33.0.ebuild
+++ b/dev-python/selenium/selenium-4.33.0.ebuild
@@ -74,8 +74,10 @@ src_prepare() {
        sed -e 's:\[tool\.setuptools-rust:[tool.ignore-me:' \
                -i pyproject.toml || die
 
-       cd "${WORKDIR}/${TEST_P}" || die
-       eapply "${FILESDIR}/${P}-pytest-ignore.patch"
+       if use test; then
+               cd "${WORKDIR}/${TEST_P}" || die
+               eapply "${FILESDIR}/${P}-pytest-ignore.patch"
+       fi
 }
 
 python_test() {

Reply via email to