summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-05-24 07:11:07 +0200
committerMichał Górny <mgorny@gentoo.org>2023-05-24 07:32:36 +0200
commit09bf5ec98bc2cd86b2ffffba633609b706b4f660 (patch)
tree3741cd48bbf66d9901ac5d3a23e7b87c28098cdb /dev-python/coverage
parentdev-python/pip-run: Bump to 10.1.1 (diff)
downloadgentoo-09bf5ec98bc2cd86b2ffffba633609b706b4f660.tar.gz
gentoo-09bf5ec98bc2cd86b2ffffba633609b706b4f660.tar.bz2
gentoo-09bf5ec98bc2cd86b2ffffba633609b706b4f660.zip
dev-python/coverage: Bump to 7.2.6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/coverage')
-rw-r--r--dev-python/coverage/Manifest1
-rw-r--r--dev-python/coverage/coverage-7.2.6.ebuild82
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest
index 2f9e6b63207c..199c3b27e751 100644
--- a/dev-python/coverage/Manifest
+++ b/dev-python/coverage/Manifest
@@ -1 +1,2 @@
DIST coverage-7.2.5.tar.gz 759465 BLAKE2B 79670165a2516047ce3b28c331ec62c7c578fbfe14bd1179be65e52c5e57923ffb0d365f9153a78134ed5d95e4e04a8eadb6df3cbc49559659cf8cb77aa9d611 SHA512 3c4ec5aaba06170c860baa23ba61fe6f19b95a433430f045272839c13cc5bf4fb12a2a030d987ad5713202c75273646639da1257c0a618658f090c8a9fee41a7
+DIST coverage-7.2.6.tar.gz 762287 BLAKE2B 68fbd5aeecb635773b509647d3d2ae3e0a46dbc34061ff0bc22ee96b0aedd77e9d9cc772f5a10ce6dbd33035765fb61325e39674804174c10a4f8bf930e5697f SHA512 b4ef257cb2ed4297e7e3f18193bec7f0ad3e81735ce4406f96fd41b0fd2becb9f16c65f3699ccb11f145f14c1c144b9d987308353d15969e47ce0b956cd8f8fc
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
+}