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.2.6.ebuild82
2 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
index be22f8673efa..00123ac9c44b 100644
--- a/dev-python/coverage/Manifest
+++ b/dev-python/coverage/Manifest
@@ -1,3 +1,5 @@
DIST coverage-7.2.5.tar.gz 759465 BLAKE2B 79670165a2516047ce3b28c331ec62c7c578fbfe14bd1179be65e52c5e57923ffb0d365f9153a78134ed5d95e4e04a8eadb6df3cbc49559659cf8cb77aa9d611 SHA512 3c4ec5aaba06170c860baa23ba61fe6f19b95a433430f045272839c13cc5bf4fb12a2a030d987ad5713202c75273646639da1257c0a618658f090c8a9fee41a7
+DIST coverage-7.2.6.tar.gz 762287 BLAKE2B 68fbd5aeecb635773b509647d3d2ae3e0a46dbc34061ff0bc22ee96b0aedd77e9d9cc772f5a10ce6dbd33035765fb61325e39674804174c10a4f8bf930e5697f SHA512 b4ef257cb2ed4297e7e3f18193bec7f0ad3e81735ce4406f96fd41b0fd2becb9f16c65f3699ccb11f145f14c1c144b9d987308353d15969e47ce0b956cd8f8fc
EBUILD coverage-7.2.5.ebuild 2025 BLAKE2B 55c67695be6587338269e9d1645e0eded19179e4bed39fa3ac4005f1844e5d1178a46f72e74c1142889156a0c2236f5500985ace896feb67978a726c7e755689 SHA512 821f7eeb1876c641bc2e8c07c61aac2351abc911aa29077ed182e4e8d21ba7e1b18af80e8419409e53cbf18e3e1810efd49ae0ae6e8a86363fbbd58a6b9318f3
+EBUILD coverage-7.2.6.ebuild 2034 BLAKE2B 2b0ca8f489291a6e45cbfb20d6dd702d6bd98ff0427727cc3c81759577193b1b32445123fe678be9c03131e6ce95a496594170d746edbc05afc0050c3077b533 SHA512 c74855f31e526264d249c3d5aa1307055fc7cd6250cb5bbba41a529f1c9334c9bb13c10d4a4ac60ddf498aae5b860a31e7620b3eb8149953b303e56b3a264883
MISC metadata.xml 771 BLAKE2B 38e9680d0851f70050aad987714a9dd2f95178b0bc3d794dc08726c0618d1ea98be32a413ac397f4b222e8a5d8fdc747b7f1677bcfe842bac4080537e85a03a9 SHA512 8c44c40348fe5d416d8b4016fe22cc9ae0b94fbaf181deb79aa737f87271992521b710c1208d0eeb7ef92d96fc8a7daac1ec6feb1ae081a80f13327b5b094064
diff --git a/dev-python/coverage/coverage-7.2.6.ebuild b/dev-python/coverage/coverage-7.2.6.ebuild
new file mode 100644
index 000000000000..becc959b2e5f
--- /dev/null
+++ b/dev-python/coverage/coverage-7.2.6.ebuild
@@ -0,0 +1,82 @@
+# 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..11} 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.{8..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_TEST_TRACER=${1}
+ einfo " Testing with the ${COVERAGE_TEST_TRACER} tracer ..."
+ epytest 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
+ )
+ 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 -x PYTEST_PLUGINS=_hypothesis_pytestplugin,flaky.flaky_pytest_plugin,xdist.plugin
+
+ 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 c
+ rm coverage/*.so || die
+ else
+ test_tracer py
+ fi
+}