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.0.ebuild110
2 files changed, 112 insertions, 0 deletions
diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
index acd907bd4a67..e11c864035b8 100644
--- a/dev-python/coverage/Manifest
+++ b/dev-python/coverage/Manifest
@@ -1,2 +1,4 @@
DIST coverage-7.13.5.tar.gz 915967 BLAKE2B e31e8855746c255db960c20b8cef10c3ef9e8f7e90d7003e59de4a4de066092b4951c74681049a34ee8d320504904376503acab046398c98788fd38ad255bf79 SHA512 6210bbd9ed0c044d07630f4303ae97e3c9f84e3bb288d748e7c7598da2206303454fa1827116defc60b557b8dd6c2aca887003634008fc425e45ba4e0cba0097
DIST coverage-7.13.5.tar.gz.provenance 9680 BLAKE2B 2d4f7742ba5dcaed044b75fde5951d0dd27898c3279f3484edca7b336b9b1cb8c1270acaff8101e0d1a8c3fad75e3b545bb4d9448629dffee7bc516251710ea2 SHA512 538158dac92b66c524d60c76939052b71cd347716e55658638eaaf7d4630b86a0bb5e12f198187700dc72c6e5d4cf41b44b4f293a2091ededa39352d8ceb8bf8
+DIST coverage-7.14.0.tar.gz 919489 BLAKE2B a1fe1a1cc1fac2d3bf0a16b7ec1cd4a2ebfed67186c3c3e27fb2de3adfb34262a8409f3c6ae976d20419735e2ac679dfc7f849828224ed0ca50fa1be6a8d47c3 SHA512 1679a464806b87d513a3636c47f1feee09064186b29c32fb5b8abc33f184cc52c9f8532c2cbde834ac121d9e2e6cb5bc499cd6b73f1bda3de230b7c76caa1ebe
+DIST coverage-7.14.0.tar.gz.provenance 9679 BLAKE2B 1e2e0b897ec7e44b7b920d9a1cb48e0870fee9675707659e88f18b909d51db2a2365d778d8cb5c4a5c48fe293a2ea7dad006db43a3a04a8640695694ca56a678 SHA512 5254b710838b56cccb384c5d0a02da2309f6086b27902c1cc480471dee42854ecb22b9e210f9cade22120c000968d17e7824f3314ec52b75622ffdd33fab4385
diff --git a/dev-python/coverage/coverage-7.14.0.ebuild b/dev-python/coverage/coverage-7.14.0.ebuild
new file mode 100644
index 000000000000..b3a677b0deba
--- /dev/null
+++ b/dev-python/coverage/coverage-7.14.0.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_{10..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
+}