summaryrefslogtreecommitdiff
path: root/dev-python/coverage
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/coverage')
-rw-r--r--dev-python/coverage/Manifest2
-rw-r--r--dev-python/coverage/coverage-7.14.2.ebuild110
2 files changed, 112 insertions, 0 deletions
diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
index 7fb3e532bd4e..c00b806b815a 100644
--- a/dev-python/coverage/Manifest
+++ b/dev-python/coverage/Manifest
@@ -4,3 +4,5 @@ DIST coverage-7.14.0.tar.gz 919489 BLAKE2B a1fe1a1cc1fac2d3bf0a16b7ec1cd4a2ebfed
DIST coverage-7.14.0.tar.gz.provenance 9679 BLAKE2B 1e2e0b897ec7e44b7b920d9a1cb48e0870fee9675707659e88f18b909d51db2a2365d778d8cb5c4a5c48fe293a2ea7dad006db43a3a04a8640695694ca56a678 SHA512 5254b710838b56cccb384c5d0a02da2309f6086b27902c1cc480471dee42854ecb22b9e210f9cade22120c000968d17e7824f3314ec52b75622ffdd33fab4385
DIST coverage-7.14.1.tar.gz 920132 BLAKE2B 750273d47ab8e1cde73ea740c52caf95711ab01820a3491d18e40a0484a890da5375dd842f04131962faa8d34d112e822f7922804d34950c3209b29e3143bfbd SHA512 a2a76bc8ff85ca816754e4e319bbb04a9d05a5b2c1d5ff3c6085c2dc374a7fbf484c8d43528e094189dfdd90af8aea2e877a05d7485b881150c98681e7acddfe
DIST coverage-7.14.1.tar.gz.provenance 9683 BLAKE2B 017b735d60156a743b21bf4e499f26d2e273a389aa5be687957388a110c820a1a9d6c9b35f580070f8f19cd704b04cfba19df95fe3c027a80178de877abd8a00 SHA512 5fb0062c12768f7f2db1daef0b202b346a9f52ced971605382069d0cc6749c798879080a126f60e7c1ca25ae9845010bbfe22fbc86ee1599254ac4642beb151b
+DIST coverage-7.14.2.tar.gz 923982 BLAKE2B 825dab5a7bfdfd751a7e641f3d1e714740231c225336856b5e90d2f1ba9bcb7b925770e42d5589542349298ead3d3610659e6664feceb2e26c0b59b8e25fd7d6 SHA512 586eb53476e400360d4b38a3fc8c245e2b7561a8ba1a0c239cee724d2414bbaa7e07d6430c1e9862f5403a26d7b055a20a235170630b75fe29afac3c4894ff13
+DIST coverage-7.14.2.tar.gz.provenance 9758 BLAKE2B 92560d10a299b3525aa49a0f976dff01daf04aff635dc8fd825f9447e8cceefc5b864b7509178121c425e2993a84e897d29bd240017d46e71af62b72439636cc SHA512 051b6e23378083641cb1b479071fd32c41b75489e42ec534bffe9a77207326e4a0a94936e65f08b61c8ecd0c224020da37ed450b4f13c3b3fbd3eb18b43615e1
diff --git a/dev-python/coverage/coverage-7.14.2.ebuild b/dev-python/coverage/coverage-7.14.2.ebuild
new file mode 100644
index 000000000000..6aae2bf728ac
--- /dev/null
+++ b/dev-python/coverage/coverage-7.14.2.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2026 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_{13..14} )
+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
+}