commit:     a900a0c587d7b24ab0a83421c10ee7811bb6a8dd
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 07:24:46 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 08:14:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a900a0c5

dev-python/coverage: Bump to 7.4.0

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

 dev-python/coverage/Manifest              |  1 +
 dev-python/coverage/coverage-7.4.0.ebuild | 98 +++++++++++++++++++++++++++++++
 2 files changed, 99 insertions(+)

diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
index 4076b2719002..8f5d3c362b5f 100644
--- a/dev-python/coverage/Manifest
+++ b/dev-python/coverage/Manifest
@@ -1,3 +1,4 @@
 DIST coverage-7.3.2.tar.gz 764541 BLAKE2B 
5301a45a1618582d6b7bc1c887fdfdc7ef612082675b271e5ab840f2adc357c6a01f59ba5571e6dba61db61c85ee66d40af46b3509dfbf5c996fcf9fd6b2a614
 SHA512 
94e3b0bae2f84d31448a717f105e4f03e485a47d9498e73e86eca2f040d0980e514e3d9264f5349f70ea93fc985161d89156d0faa444d28cc7a07e51db4e1a46
 DIST coverage-7.3.3.tar.gz 768726 BLAKE2B 
0de19dc69341ba98b0581be6c6c4844f699689d9e071e3f473a4de65f4f7d1e8bf673a18428f1d5fe23150068636c1e0b7f8e84d9a8626488aba23a998265857
 SHA512 
758090c46bac90096d5fd732aa447c91d0db0c0cdedbb607a57141c86882c23d42791b75e55436e580dffdd585d87e35a213e94240268c2992c1122246e4df31
 DIST coverage-7.3.4.tar.gz 769564 BLAKE2B 
6fb3faac8703f95632e53b4a2e3ad5544488e19cb3ea96a288cded02ac8aaf434ee8fba8c1ed3cdf89265113ae45cb7b9882202dc230dc6a416487f09317ba82
 SHA512 
74c371b24ff5959f9c5d100f35b09ce10c70c03f3713c29aa251c1ce4244e302c29e0cc2f54f6ff6909634a363896bfbd61abe871c062c8b78c892efbc1d2d79
+DIST coverage-7.4.0.tar.gz 776507 BLAKE2B 
ea96db033e711c5b47ebbd585f1eec8e576908dfbecd7df6e555a5e96cdbadf546e0b2b1a5790fd66be386a068ced5a1544dff79601546fe6a4ac0e9b36a05a2
 SHA512 
7563ca34ed8d0dd3b9f376b20cbaeb9c952ba0dda57d9f1a33abe94ac17ed6411d0d537f039613c310957eb926e8fa102ad888c5de8bdb3f0233668bdf96d395

diff --git a/dev-python/coverage/coverage-7.4.0.ebuild 
b/dev-python/coverage/coverage-7.4.0.ebuild
new file mode 100644
index 000000000000..f41bcfc267b9
--- /dev/null
+++ b/dev-python/coverage/coverage-7.4.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_REQ_USE="threads(+),sqlite(+)"
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Code coverage measurement for Python"
+HOMEPAGE="
+       https://coverage.readthedocs.io/en/latest/
+       https://github.com/nedbat/coveragepy/
+       https://pypi.org/project/coverage/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~x64-macos"
+
+RDEPEND="
+       $(python_gen_cond_dep '
+               dev-python/tomli[${PYTHON_USEDEP}]
+       ' 3.{9..10})
+"
+BDEPEND="
+       test? (
+               dev-python/flaky[${PYTHON_USEDEP}]
+               dev-python/hypothesis[${PYTHON_USEDEP}]
+               dev-python/pytest-xdist[${PYTHON_USEDEP}]
+               >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}]
+       )
+"
+
+distutils_enable_tests pytest
+
+src_prepare() {
+       sed -i -e '/addopts/s:-q -n auto::' pyproject.toml || die
+       distutils-r1_src_prepare
+}
+
+test_tracer() {
+       local -x COVERAGE_CORE=${1}
+       einfo "  Testing with the ${COVERAGE_CORE} core ..."
+       epytest -p flaky -p hypothesis -p xdist tests
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # TODO: fails because of additional "Terminated" print on 
SIGTERM
+               
tests/test_concurrency.py::SigtermTest::test_sigterm_threading_saves_data
+               # 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
+       )
+       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 -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+
+       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
+       fi
+
+       test_tracer pytrace
+
+       case ${EPYTHON} in
+               python3.1[01]|pypy3)
+                       ;;
+               *)
+                       # available since Python 3.12
+                       test_tracer sysmon
+                       ;;
+       esac
+
+       if [[ -n ${c_ext} ]]; then
+               rm coverage/*.so || die
+       fi
+}

Reply via email to