From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 90533158089 for ; Tue, 7 Nov 2023 05:29:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37DA42BC017; Tue, 7 Nov 2023 05:29:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 169662BC017 for ; Tue, 7 Nov 2023 05:29:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0334F335D1B for ; Tue, 7 Nov 2023 05:29:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38614132A for ; Tue, 7 Nov 2023 05:29:19 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1699334947.efb3420408bcf988abe78f92ab8aa93069dba566.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/distutils-r1.eclass eclass/python-utils-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: efb3420408bcf988abe78f92ab8aa93069dba566 X-VCS-Branch: master Date: Tue, 7 Nov 2023 05:29:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b9c1d767-cc24-4e92-92f1-a27a4cc7f52e X-Archives-Hash: 151a82e053f2fbe5b9e806f78f1aab3e commit: efb3420408bcf988abe78f92ab8aa93069dba566 Author: Michał Górny gentoo org> AuthorDate: Fri Nov 3 19:16:30 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Nov 7 05:29:07 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efb34204 distutils-r1.eclass: Add pytest-xdist dep if EPYTEST_XDIST is set Make `distutils_enable_tests pytest` automatically add the `dev-python/pytest-xdist` dependency if `EPYTEST_XDIST` is set. Signed-off-by: Michał Górny gentoo.org> eclass/distutils-r1.eclass | 3 +++ eclass/python-utils-r1.eclass | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 3d69911d9209..3d756eaad556 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -617,6 +617,9 @@ distutils_enable_tests() { ;; pytest) test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]' + if [[ ${EPYTEST_XDIST} ]]; then + test_pkgs+=' dev-python/pytest-xdist[${PYTHON_USEDEP}]' + fi ;; setup.py) ;; diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 48963728cc2f..80abe974f9df 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1311,7 +1311,9 @@ _python_check_occluded_packages() { # @DEFAULT_UNSET # @DESCRIPTION: # If set to a non-empty value, enables running tests in parallel -# via pytest-xdist plugin. +# via pytest-xdist plugin. If this variable is set prior to calling +# distutils_enable_tests in distutils-r1, a test dependency +# on dev-python/pytest-xdist is added automatically. # @ECLASS_VARIABLE: EPYTEST_JOBS # @USER_VARIABLE