re-add coverage-6.4 (from main)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
DIST coverage-5.3.tar.gz 693632 BLAKE2B 9daa3a0fd7f8c3ff7c9d68603e11a0a419d3ab50e3c3fb6be5b694aa1f7566040e1212b7175dfa4f71a0a309db325c00f94a85e0e9e755ae8c4f09c499d0daf4 SHA512 f40a21c394b1a72118965f702ae2b8e09c4e0b2fe92709aedf1de4c8074cd9c2cae0ed4860fbb863e4e5479f1067ff806d7051f7683d6b324de9945c0cacfc39
|
||||
EBUILD coverage-5.3.ebuild 1934 BLAKE2B e84f0179aed6b8d2528eed3ab0d1a6e759d0b0a73b06c4aab463edad2ff5fa6c9f8cdf355bcee0535b8ac93307cd0da6cb7cddc215a6da6e74856c5ce28db252 SHA512 38139115ff5b727fcd9cc782b6803da5a65abb66b636e864ab3979eed364285dc1cd0430ce52777f3decc69d8b5d56a0b9844feaec26ef20d083a75ad33b1342
|
||||
DIST coverage-6.4.tar.gz 715897 BLAKE2B 69fd1979da2c652d5cf8b83adcde4755824faf832867c0181e610ef1369bae217c487b230aa649f03692440efc78628474d72303635568f8e7e5b41f83afc1ed SHA512 e834ff2329eb930ea40a28e8be7f665322558a1f00b5297a2daaaefc986ae451f333ea76bf6e345cad1560d721ebd990cdd5b79b30bddd9e17223acc85508089
|
||||
EBUILD coverage-6.4.ebuild 1686 BLAKE2B 433e48ff442b0b5523eb1bcc841e54baaa77704328ec322fbf2431b3e249022cce2007cca81b5e074024c83b5382eeb934543a38d1be54b1aa4b840a13be64dd SHA512 a339c3326b111097b5812beaf12da90ba021ea9bb2dff68f97754af3ca4e21d28de607445441709180a3d14c847bc8021bfab657f79b310f2d5b7745b564ce2b
|
||||
MISC metadata.xml 252 BLAKE2B 507e0ddc9d50b879ff374b903b142f85d020dfd6c486aba2af84fe082c878e780edbb79188ae10104d57db0eb775c86814cc8c06891a3854c9da840a4d377050 SHA512 9470ac9c8a5a4f80e3f767e7aa198addc7b21866c63b2a310e9f41ce65817672fb77423117bdd619e99cb62322025aeadf50717e23eafabf99080fcc106820af
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
|
||||
PYTHON_REQ_USE="threads(+),sqlite(+)"
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Code coverage measurement for Python"
|
||||
HOMEPAGE="https://coverage.readthedocs.io/en/latest/ https://pypi.org/project/coverage/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
#IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
# The tests are impossible to appease. Please run them externally
|
||||
# via tox. Or fix the ebuild if you have hours of time to spend
|
||||
# on something utterly useless.
|
||||
RESTRICT="test"
|
||||
|
||||
#BDEPEND="
|
||||
# test? (
|
||||
# dev-python/PyContracts[${PYTHON_USEDEP}]
|
||||
# dev-python/flaky[${PYTHON_USEDEP}]
|
||||
# dev-python/hypothesis[${PYTHON_USEDEP}]
|
||||
# dev-python/mock[${PYTHON_USEDEP}]
|
||||
# dev-python/pytest[${PYTHON_USEDEP}]
|
||||
# >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}]
|
||||
# )
|
||||
#"
|
||||
|
||||
src_prepare() {
|
||||
# avoid the dep on xdist, run tests verbosely
|
||||
sed -i -e '/^addopts/s:-n3:-v:' setup.cfg || die
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
if [[ ${EPYTHON} == python2.7 ]]; then
|
||||
local CFLAGS="${CFLAGS} -fno-strict-aliasing"
|
||||
export CFLAGS
|
||||
fi
|
||||
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
local bindir=${TEST_DIR}/scripts
|
||||
|
||||
pushd tests/eggsrc >/dev/null || die
|
||||
distutils_install_for_testing
|
||||
popd >/dev/null || die
|
||||
|
||||
"${EPYTHON}" igor.py zip_mods || die
|
||||
PATH="${bindir}:${PATH}" "${EPYTHON}" igor.py test_with_tracer py || die
|
||||
|
||||
# No C extensions under pypy
|
||||
if [[ ${EPYTHON} != pypy* ]]; then
|
||||
cp -l -- "${TEST_DIR}"/lib/*/coverage/*.so coverage/ || die
|
||||
PATH="${bindir}:${PATH}" "${EPYTHON}" igor.py test_with_tracer c || die
|
||||
fi
|
||||
|
||||
# clean up leftover "egg1" directory
|
||||
rm -rf build/lib/egg1 || die
|
||||
}
|
||||
68
dev-python/coverage/coverage-6.4.ebuild
Normal file
68
dev-python/coverage/coverage-6.4.ebuild
Normal file
@@ -0,0 +1,68 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{8..11} pypy3 )
|
||||
PYTHON_REQ_USE="threads(+),sqlite(+)"
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Code coverage measurement for Python"
|
||||
HOMEPAGE="
|
||||
https://coverage.readthedocs.io/en/latest/
|
||||
https://github.com/nedbat/coveragepy/
|
||||
https://pypi.org/project/coverage/
|
||||
"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
|
||||
|
||||
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::' setup.cfg || 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() {
|
||||
"${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
|
||||
}
|
||||
Reference in New Issue
Block a user