commit:     471c73648df22588b48ce23f24081bd72d06959f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 19 04:05:20 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Nov 19 04:05:20 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=471c7364

dev-python/coverage: Bump to 7.12.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/coverage/Manifest               |   2 +
 dev-python/coverage/coverage-7.12.0.ebuild | 110 +++++++++++++++++++++++++++++
 2 files changed, 112 insertions(+)

diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
index 59735f0c8f4d..ac6b1b83e791 100644
--- a/dev-python/coverage/Manifest
+++ b/dev-python/coverage/Manifest
@@ -1,3 +1,5 @@
 DIST coverage-7.10.7.tar.gz 827704 BLAKE2B 
a1361d23e192c6207a817d3cf0d6fc269292b6a5fe7c6d8ef453c554c64ba338449e75503aad912e61f34fb32046839760d1768dc13a718f625ea7748e0e8fca
 SHA512 
3fd187c014d1eb3edd3aa91ff1946a325daa0cdec02f61d19fd8acd5bd65f8b3cb21d48a8875bce2f47543a1494b02f8d96070045a37d928c8e76d8563e776a1
 DIST coverage-7.11.3.tar.gz 815210 BLAKE2B 
6d48503efb9717313c3c17f718029642cb24b3cbbb282316b192bae71b2b5ee9ad784c062b484a0b231be2d2ebb82e2f64cd3514f36508c64771ae73c284d661
 SHA512 
5fb8724f04a212a1a18843e9500487b54dca24aac056817c109a125a149f10c0544e7d7e89dd5d6769641f89a486fed1cc1f6fdfbab103201a58a97350fbac67
 DIST coverage-7.11.3.tar.gz.provenance 9540 BLAKE2B 
d963e545e63cd1ff577eebc7dfc00e452b14171988e5bf74a3ffe0fde01a0da0e4857d34e6157b39e4721ac4f7d198eeabe7fb5f28603c0c92294c94c86fd629
 SHA512 
dad801095cf8058568e66b7a1aa8ccecd8582d4d42281d2251b4c1180b8743751298a8dd8e7108613842ea30de3ee604e5bddf3db304bf587abb8cc35bbe4f76
+DIST coverage-7.12.0.tar.gz 819341 BLAKE2B 
0f3a0a333eedf3ab4af3f3765e94b3f61dbd6f87bed5e730e216535ce4e15a41034e0127730b9252a9ad9209feefdfd1b72eb218f410694d396530f8a41ceeac
 SHA512 
eeb7228f8f834d304b168b34e29e60e7ccec820f46643785f17beae69cecea34550cf251268c5f58f7238c13ff71a495fad7ac1c790b21b8d6a4c46124d3d20c
+DIST coverage-7.12.0.tar.gz.provenance 9411 BLAKE2B 
d8d2374aa98f280396f83081d292ec221457c9a5a81edebcb3bb10c685addb9e4484213ac708a570c427bf0b75bd846f5a24140a0cbf99406c7a9514d108aa37
 SHA512 
1a4b5541597b0c0d6b98cbd45e35d45787c539e1a0e47d36d2ba740746483e12fab1bd6461c6a59e2d45faa139ad38524e8ec89e47a36eeac9f5161acc00eedf

diff --git a/dev-python/coverage/coverage-7.12.0.ebuild 
b/dev-python/coverage/coverage-7.12.0.ebuild
new file mode 100644
index 000000000000..2426c05f2db9
--- /dev/null
+++ b/dev-python/coverage/coverage-7.12.0.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYPI_VERIFY_REPO=https://github.com/coveragepy/coveragepy
+PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
+PYTHON_REQ_USE="threads(+),sqlite(+)"
+
+inherit distutils-r1 multiprocessing pypi
+
+DESCRIPTION="Code coverage measurement for Python"
+HOMEPAGE="
+       https://coverage.readthedocs.io/en/latest/
+       https://github.com/coveragepy/coveragepy/
+       https://pypi.org/project/coverage/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~x64-macos"
+IUSE="+native-extensions"
+
+BDEPEND="
+       test? (
+               >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}]
+       )
+"
+
+EPYTEST_PLUGINS=( hypothesis pytest-{rerunfailures,xdist} )
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+python_compile() {
+       if ! use native-extensions; then
+               local -x COVERAGE_DISABLE_EXTENSION=1
+       fi
+
+       distutils-r1_python_compile
+}
+
+test_tracer() {
+       local -x COVERAGE_CORE=${1}
+       einfo "  Testing with the ${COVERAGE_CORE} core ..."
+       epytest -o addopts= "${@:2}" tests
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # broken because of pytest plugins explicity loaded
+               tests/test_debug.py::ShortStackTest::test_short_stack{,_skip}
+               # these expect specific availability of C extension matching
+               # COVERAGE_CORE (which breaks testing pytracer on CPython)
+               tests/test_cmdline.py::CmdLineStdoutTest::test_version
+               tests/test_debug.py::DebugTraceTest::test_debug_sys_ctracer
+               # mismatch of expected concurrency in error message
+               # TODO: report upstream?
+               tests/test_concurrency.py::ConcurrencyTest::test_greenlet
+               
tests/test_concurrency.py::ConcurrencyTest::test_greenlet_simple_code
+               # packaging tests, fragile to setuptools version
+               tests/test_setup.py
+               # looks like a difference in exit status reporting?
+               # https://github.com/nedbat/coveragepy/issues/2008
+               tests/test_process.py::ProcessTest::test_save_signal_usr1
+       )
+       local EPYTEST_IGNORE=(
+               # pip these days insists on fetching build deps from Internet
+               tests/test_venv.py
+       )
+
+       "${EPYTHON}" igor.py zip_mods || die
+
+       local -x COVERAGE_TESTING=True
+       # TODO: figure out why they can't be imported inside test env
+       local -x COVERAGE_NO_CONTRACTS=1
+
+       local jobs=${EPYTEST_JOBS:-$(makeopts_jobs)}
+       local xdist_args=()
+       if [[ ${jobs} -gt 1 ]]; then
+               # required upstream to avoid cross-test conflicts
+               xdist_args+=( --dist=loadgroup )
+       fi
+
+       local prev_opt=$(shopt -p nullglob)
+       shopt -s nullglob
+       local c_ext=( "${BUILD_DIR}/install$(python_get_sitedir)"/coverage/*.so 
)
+       ${prev_opt}
+
+       if [[ -n ${c_ext} ]]; then
+               cp "${c_ext}" coverage/ || die
+               test_tracer ctrace "${xdist_args[@]}"
+       fi
+
+       test_tracer pytrace "${xdist_args[@]}"
+
+       case ${EPYTHON} in
+               *3.11)
+                       ;;
+               *)
+                       # available since Python 3.12
+                       test_tracer sysmon "${xdist_args[@]}"
+                       ;;
+       esac
+
+       if [[ -n ${c_ext} ]]; then
+               rm coverage/*.so || die
+       fi
+}

Reply via email to