commit:     61a3127bb328ab383b2a8e9ebda22eb5963aba62
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 14 13:40:59 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 14 13:56:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61a3127b

dev-python/pytest-cov: add 6.0.0

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/pytest-cov/Manifest                |  1 +
 dev-python/pytest-cov/pytest-cov-6.0.0.ebuild | 63 +++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/dev-python/pytest-cov/Manifest b/dev-python/pytest-cov/Manifest
index 5e6613bf2053..239bcc8da054 100644
--- a/dev-python/pytest-cov/Manifest
+++ b/dev-python/pytest-cov/Manifest
@@ -1 +1,2 @@
 DIST pytest-cov-5.0.0.tar.gz 63042 BLAKE2B 
6a0f3b38bbf6ae8843d804d078b3879e76ef146ba1bee2eb068bffe560332984994a8405964be185b2ededc2c8231288e609573c5a83143147eeb537659da1e5
 SHA512 
384459cafdb800711b935899acc3716f5fcbc28b40be0e168e58333603b1dea474bbd7a92f09b6afbe2f9dc1ce8599668a787c0f93884c263af894f44311a4a6
+DIST pytest-cov-6.0.0.tar.gz 66945 BLAKE2B 
8746915eb23b7d524e15ece1a05d5a1c8de6e8e08b807142e9a03f48605d54f715396d73cdb4ee5004dc5703ac0f68309e700d783ebb2037fc861e00033c35f3
 SHA512 
2947a032417d60867595bb65630942ff5d8a61523af5298e3f169420b28882f9b4256d89980a9cbe88c34f9b7fa759f44fd64d391ad86c1491a55f9a70282bf0

diff --git a/dev-python/pytest-cov/pytest-cov-6.0.0.ebuild 
b/dev-python/pytest-cov/pytest-cov-6.0.0.ebuild
new file mode 100644
index 000000000000..7a0c80e7d268
--- /dev/null
+++ b/dev-python/pytest-cov/pytest-cov-6.0.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 multiprocessing pypi
+
+DESCRIPTION="pytest plugin for coverage reporting"
+HOMEPAGE="
+       https://github.com/pytest-dev/pytest-cov
+       https://pypi.org/project/pytest-cov/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86"
+
+RDEPEND="
+       >=dev-python/py-1.4.22[${PYTHON_USEDEP}]
+       >=dev-python/pytest-3.6[${PYTHON_USEDEP}]
+       >=dev-python/coverage-6.4.4-r1[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       test? (
+               dev-python/virtualenv[${PYTHON_USEDEP}]
+               dev-python/fields[${PYTHON_USEDEP}]
+               >=dev-python/process-tests-2.0.2[${PYTHON_USEDEP}]
+               dev-python/pytest-xdist[${PYTHON_USEDEP}]
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.0.0-pytest-xdist-2.5.0.patch
+)
+
+distutils_enable_sphinx docs \
+       dev-python/furo
+distutils_enable_tests pytest
+
+python_test() {
+       # NB: disabling all plugins speeds tests up a lot
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       local -x PYTEST_PLUGINS=pytest_cov.plugin,xdist.plugin,xdist.looponfail
+
+       local src=$(
+               "${EPYTHON}" -c "import coverage as m; print(*m.__path__)" || 
die
+       )
+       # TODO: why do we need to do that?!
+       # https://github.com/pytest-dev/pytest-cov/issues/517
+       ln -s "${src}" \
+               "${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die
+
+       nonfatal epytest -n "$(makeopts_jobs)" --dist=worksteal
+       local ret=${?}
+
+       rm "${BUILD_DIR}/install$(python_get_sitedir)/coverage" || die
+
+       [[ ${ret} -ne 0 ]] && die "epytest failed on ${EPYTHON}"
+}

Reply via email to