commit: 552bacb888635461eb06df97ffd2e1c135d9d20e Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Apr 30 13:46:25 2023 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Apr 30 14:56:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=552bacb8
dev-python/coverage: Bump to 7.2.5 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/coverage/Manifest | 1 + dev-python/coverage/coverage-7.2.5.ebuild | 82 +++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest index 43f7eb25d40b..72a29c721029 100644 --- a/dev-python/coverage/Manifest +++ b/dev-python/coverage/Manifest @@ -1,3 +1,4 @@ DIST coverage-7.2.2.tar.gz 812407 BLAKE2B 901ed01eb8411e01c3386dcecccf975f4ac0e46c14fd2c6086bcf83647ff7e26deccb3926f173a207ef2851c0f8c5f99874659a1ba2e16f85b6eb9a1ac23142c SHA512 7d2ba6540ca42c3a72b65343348a64c58156bac915434249fd8740a6727ebf034590f62a5557f6b2f76e67ed1adc2a153ce61eee71f3bc903538c440e080e3e7 DIST coverage-7.2.3.tar.gz 757154 BLAKE2B eb2d7e9e52dd9480f806556fbb73864884365215834640a1458c06d137706d3a5ca818c0418ecc6646b0722fd23a0348eddb97521a7cd024c218b872072661ea SHA512 2710424b04f812299777497e526d259a3ac35205b425a53973954c8e51cd39e75c30f8be9d60656e7369d3fa2decd810a8cb395dd433381495db4f6a7cd9a600 DIST coverage-7.2.4.tar.gz 759129 BLAKE2B 186f5dcd5abd86634cf6cd3c58be47cc68e8d8417df02b4e55ac3d66703664b2069cb3f94fdff726eca99108fd243f6410b0118cf4a2b21a067653f567f8f013 SHA512 f22d475a64828d0613747cf7315053c4830acb9931acfe58e1c29029028f0a48e9c633649bea92ab6bae3b67daf790eb9cf3d6ea22dec1d1f5dce7df673ff3ae +DIST coverage-7.2.5.tar.gz 759465 BLAKE2B 79670165a2516047ce3b28c331ec62c7c578fbfe14bd1179be65e52c5e57923ffb0d365f9153a78134ed5d95e4e04a8eadb6df3cbc49559659cf8cb77aa9d611 SHA512 3c4ec5aaba06170c860baa23ba61fe6f19b95a433430f045272839c13cc5bf4fb12a2a030d987ad5713202c75273646639da1257c0a618658f090c8a9fee41a7 diff --git a/dev-python/coverage/coverage-7.2.5.ebuild b/dev-python/coverage/coverage-7.2.5.ebuild new file mode 100644 index 000000000000..89226568addc --- /dev/null +++ b/dev-python/coverage/coverage-7.2.5.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_{9..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 +}