dev-python/coverage: re-add 7.5.0 from Gentoo archive

Closes: #3520
Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
2024-06-26 16:29:54 +02:00
parent 33f0b4a4f4
commit 6ff204b7fd
4 changed files with 104 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
DIST coverage-7.3.4.tar.gz 769564 BLAKE2B 6fb3faac8703f95632e53b4a2e3ad5544488e19cb3ea96a288cded02ac8aaf434ee8fba8c1ed3cdf89265113ae45cb7b9882202dc230dc6a416487f09317ba82 SHA512 74c371b24ff5959f9c5d100f35b09ce10c70c03f3713c29aa251c1ce4244e302c29e0cc2f54f6ff6909634a363896bfbd61abe871c062c8b78c892efbc1d2d79
EBUILD coverage-7.3.4.ebuild 2004 BLAKE2B e874897a9f8e061adf921ce74acde82254cc595d5925a00a88ec024d0878f6bb8ea3309e524ac83a932dca4090bfb1300fd91a010134fe88204c0ec01e3c8298 SHA512 370cf6a000d082e64e09d85655ad89cd8b52f3c979363499f0b740396a82fed52dc5fd4567656988c926167946852052bc5bfb2ec2d81dd193a2652953db95e2
DIST coverage-7.5.0.tar.gz 798314 BLAKE2B 6f7b80d1a46fb88f92571bc23fa2e061680e4e72e6339332f135ace6072570776abbfdce7654d34599ccd1dff920fb1d7cbdc7039a341d10e130408d554e6f83 SHA512 1332f630e6f6ed9a2445f93a3826f22151cf4eff2491163a6d01ef1ce468928a52871ee71aeeb716e8e4f04542524ae25213a37bdb874c4a663cbc581482530d
EBUILD coverage-7.3.4.ebuild 2004 BLAKE2B 645abf1f4d925c214a72e4cf55722c40a91dde35297866a49d0a89cf6f584867ba7fb56ce4304dd2565a2ad27e8e9894e3738f56d250564d30d36ae4595da7eb SHA512 f7061001750fd6ab7314f1741a90e3df06dcf45106ca170dd5a61f4aa37c4ed27dd755fa18d82a5a726e1ec9e127f4d830daa2fe951c5e76996319e8741646df
EBUILD coverage-7.5.0.ebuild 2385 BLAKE2B 8a4aff91244840975775b36420f24e51aa4ff972d4ca7cae9347710991f313213296fa3ad049e5273c4edd0e2a5ce0b076f2cdd43a1c08897ffaf51c5e59dc28 SHA512 feeb431ee71ce682611f6feb2fe7aaaead043b52a4a772ad830ed4814d75dbc26ae7cd8e30fc115a14d24f1af3ef657f5fdd740356b5062f9be016076f4ed5f9
MISC metadata.xml 530 BLAKE2B 97ee7aff55910b2be221f1294c796c5bd261cc5d5eeeeb18bd1d434e3b9aa8ebe0fe5d62967095fe011426bf33db4ab331fe690ec1112da93f2f38de702e363a SHA512 5d9dfed8a5b698e615c316f2fafbe3fc46a48bfd79678c3f3d343b84ca125cb3bef6eae78b15728aa05a0693c3231edf23f15999b4ebef09a4efa31eb011a3a2

View File

@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_REQ_USE="threads(+),sqlite(+)"
inherit distutils-r1 pypi

View File

@@ -0,0 +1,98 @@
# Copyright 1999-2024 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_{11..13} )
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="amd64 arm arm64 x86"
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
}