From b284a3168fa91a038925d2ecf5e4791011ea5e7d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 18 Nov 2019 10:15:03 +0000 Subject: gentoo resync : 18.11.2019 --- dev-python/coverage/Manifest | 7 +- dev-python/coverage/coverage-4.2.ebuild | 1 + dev-python/coverage/coverage-4.5.2.ebuild | 1 + dev-python/coverage/coverage-4.5.4.ebuild | 71 ++++++++++++++ .../coverage/files/coverage-4.5.4-tests.patch | 104 +++++++++++++++++++++ 5 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 dev-python/coverage/coverage-4.5.4.ebuild create mode 100644 dev-python/coverage/files/coverage-4.5.4-tests.patch (limited to 'dev-python/coverage') diff --git a/dev-python/coverage/Manifest b/dev-python/coverage/Manifest index cd1a3b3ac53d..d68eadd7ab51 100644 --- a/dev-python/coverage/Manifest +++ b/dev-python/coverage/Manifest @@ -1,5 +1,8 @@ +AUX coverage-4.5.4-tests.patch 4122 BLAKE2B d720f526a171da06b54f6433235875148cf9c5b9f7660afa61eb48811c1c1c61cf57de49a37612f01277d03ed7a4d5473ac9bcda4a326e5be9c02d6062499abd SHA512 14b07e98c59600c2a6a8ef6bea61a80a5129fa034b5ecb87fca67a1ee784bc2d7a62256c2776e9600b3e1a076ffbd0d002187379f773715e9c536ec02e07b0fa DIST coverage-4.2.tar.gz 359873 BLAKE2B 4bca9c44922ad99203d65387267c62bee02b0368dfd70c758dbed959ebaa1352366603359865662cde863ca1518de21a4d33d22b86b78ff75c2c23aecf4d726c SHA512 17c508e65e8494bda51dc301eb99e24f39392cc3efe54eee5d94bf45021f91cb5e1acc192981974eb1725e01cd4590c80308bf9bb237a129c2de067bd4556e23 DIST coverage-4.5.2.tar.gz 384845 BLAKE2B a7b4f249a68e025449d26ef8ee2194b9ce355c979d1f5192a7863a0ab0089f9deb3a8e63a39bef528ed7c58fbcc7cd4bc193fea3a135f5996a6655268a6b7a93 SHA512 0d98c8118648a319ac6f3b4c4c6f1ff8a92085bbe8276dd5504c8df4638933f920d7382d8e6de8e16bff43b62091310e0eab7b7722c6d28c976baedbfae3d03e -EBUILD coverage-4.2.ebuild 1218 BLAKE2B 0c6479e91f64eb1dba20c9fcce71861c89c9a536be0dfe246f60f34110380b609c0965dab2f954f1e3290bd8c11ec54ffcc2ea6f8665d31047ee6e18485e6edd SHA512 5416ce0fb15bb1934f92806bcdf1aff542a9600fd14da7f78034a9586f8639bb493fb9131499941f10328c6c64e7a6b8463b2e435f532dd67c5f2e70f409547d -EBUILD coverage-4.5.2.ebuild 1217 BLAKE2B b4e223e1d379d855146fb39511e5775c8f20c5de188beb7f6262f5458788ca2d540ebca650c309b616796ebfb62cb4348f8c193fe1e4aea74aff5f15c8a07e4c SHA512 46f3025551bcb85a5ecc914ac9559f16952b3d2eed502905728ad384adb93c752fb086d5fd310ecdf2f6c4cf04245963927c3a7030cf552b4d06980ffd831a52 +DIST coverage-4.5.4.tar.gz 385185 BLAKE2B 9d040bff13cebd1cb7147f15c3ec03bb08648cf801b5b2bb046a6b5bcadb3d3886be8bf0a624d225f25d10a5ca82fe5fb88f55e44e92a0a3285836b837972970 SHA512 ba534e04fe35cbadc4b16735f25c08f579a49a6677ec106680f222f2dfb3d0f1e011d0962f1c2108c375173ac4588bea1619ecda05ff9ba6fd888daddfd27b0e +EBUILD coverage-4.2.ebuild 1245 BLAKE2B ccd13bc4859a329781600fc33c74d6d40c12df18b1552eaeed4d6ef7eb1571f3ae51252cdcfb87de051647bfc4c3831a4e81fe6d09e5954b3d044d57be7576c7 SHA512 75a189500516f4f677410a9df61588ae256a246b3239b1c78f1ec04be5750238710871a39cd928a7f3bcd352025a72a2c3defcaa181ea6f65e82da92fd24a133 +EBUILD coverage-4.5.2.ebuild 1244 BLAKE2B 39420d4e3a6ec6f67391f9ee9f7824b28873c7ccdc4ab9515eef1b98d46a21e04d41536bf307326caea6d5d122344c5a16b8731cfee23d3246d34ef40228f8e1 SHA512 20e59c9a860d4d7d8eb914f2278f46186a4fc9f87824fbceda4869779eb82814dba2f6c98157da116df32cc871d9cbc15e459f190527544c9b58149be9b39fb2 +EBUILD coverage-4.5.4.ebuild 1697 BLAKE2B 7aa8c05eb0153992812c30adb4773f92815ac1164c51240c7bb4bb3573f9268d79b06583df634923ccfc117421cad004195990d2cead4cf9038d01d5a245524f SHA512 5b8b6bfe8935ee95735c2a3e5c59d03605bd443ccdb6c098c28583d6c568b9f8ba847fd5bc4902369a93515974f1dd5a7c537f2a1ff84504ef9a098748b2df29 MISC metadata.xml 713 BLAKE2B af0e3d7e3b503581edb2552d0eaddcc9cf3ea5cb92db247cbae4dc66edfb1da6608f472cd2e76e1c17537b6907b991fbf2b4c250792ba6654fd0d4924da599db SHA512 d836604218fc48fd477b27744c6f97a40c3102b859b25e327cd0775ecc54390db62c9f4096c8c54af26557c38dd48ae138a8bed742aaa759572189974522ede5 diff --git a/dev-python/coverage/coverage-4.2.ebuild b/dev-python/coverage/coverage-4.2.ebuild index 64e0292d1d45..0db0400c8bc5 100644 --- a/dev-python/coverage/coverage-4.2.ebuild +++ b/dev-python/coverage/coverage-4.2.ebuild @@ -16,6 +16,7 @@ LICENSE="BSD" SLOT="0" KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="test" +RESTRICT="!test? ( test )" RDEPEND="" DEPEND=" diff --git a/dev-python/coverage/coverage-4.5.2.ebuild b/dev-python/coverage/coverage-4.5.2.ebuild index 285a75e51f23..755bd7f16b78 100644 --- a/dev-python/coverage/coverage-4.5.2.ebuild +++ b/dev-python/coverage/coverage-4.5.2.ebuild @@ -15,6 +15,7 @@ LICENSE="BSD" SLOT="0" KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" IUSE="test" +RESTRICT="!test? ( test )" RDEPEND="" DEPEND=" diff --git a/dev-python/coverage/coverage-4.5.4.ebuild b/dev-python/coverage/coverage-4.5.4.ebuild new file mode 100644 index 000000000000..e0198d5dd4ea --- /dev/null +++ b/dev-python/coverage/coverage-4.5.4.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy pypy3 ) +PYTHON_REQ_USE="threads(+)" + +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="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND="" +BDEPEND=" + >=dev-python/setuptools-18.4[${PYTHON_USEDEP}] + test? ( + dev-python/PyContracts[${PYTHON_USEDEP}] + dev-python/flaky[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + >=dev-python/unittest-mixins-1.4[${PYTHON_USEDEP}] + ) +" + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}/coverage-4.5.4-tests.patch" +) + +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 +} diff --git a/dev-python/coverage/files/coverage-4.5.4-tests.patch b/dev-python/coverage/files/coverage-4.5.4-tests.patch new file mode 100644 index 000000000000..193c4e88ef91 --- /dev/null +++ b/dev-python/coverage/files/coverage-4.5.4-tests.patch @@ -0,0 +1,104 @@ +diff --git a/tests/farm/run/run_timid.py b/tests/farm/run/run_timid.py +index 0370cf84..4e3cf1ca 100644 +--- a/tests/farm/run/run_timid.py ++++ b/tests/farm/run/run_timid.py +@@ -38,6 +38,10 @@ if os.environ.get('COVERAGE_TEST_TRACER', 'c') == 'c': + else: + # If the Python trace function is being tested, then regular running will + # also show the Python function. +- contains("out_timid/showtraceout.txt", "regular PyTracer") ++ # ++ # tox.ini deletes compiled c modules to make this test work, not feasible ++ # to do this from the ebuild environment ++ #contains("out_timid/showtraceout.txt", "regular PyTracer") ++ pass + + clean("out_timid") +diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py +index 578cc679..ae340099 100644 +--- a/tests/test_concurrency.py ++++ b/tests/test_concurrency.py +@@ -11,6 +11,7 @@ import time + + from flaky import flaky + ++import unittest + import coverage + from coverage import env + from coverage.backward import import_local_file +@@ -271,6 +272,7 @@ class ConcurrencyTest(CoverageTest): + code = SIMPLE.format(QLIMIT=self.QLIMIT) + self.try_some_code(code, "gevent", gevent) + ++ @unittest.skip("greenlet tests don't work with python tracer") + def test_greenlet(self): + GREENLET = """\ + from greenlet import greenlet +@@ -289,6 +291,7 @@ class ConcurrencyTest(CoverageTest): + """ + self.try_some_code(GREENLET, "greenlet", greenlet, "hello world\n42\n") + ++ @unittest.skip("greenlet tests don't work with python tracer") + def test_greenlet_simple_code(self): + code = SIMPLE.format(QLIMIT=self.QLIMIT) + self.try_some_code(code, "greenlet", greenlet) +diff --git a/tests/test_filereporter.py b/tests/test_filereporter.py +index 91e47762..121c3260 100644 +--- a/tests/test_filereporter.py ++++ b/tests/test_filereporter.py +@@ -4,6 +4,7 @@ + """Tests for FileReporters""" + + import os ++import unittest + + from coverage.plugin import FileReporter + from coverage.python import PythonFileReporter +@@ -87,6 +88,7 @@ class FileReporterTest(UsingModulesMixin, CoverageTest): + assert acu < bcu and acu <= bcu and acu != bcu + assert bcu > acu and bcu >= acu and bcu != acu + ++ @unittest.skip("we don't install zip eggs on gentoo") + def test_egg(self): + # Test that we can get files out of eggs, and read their source files. + # The egg1 module is installed by an action in igor.py. +diff --git a/tests/test_oddball.py b/tests/test_oddball.py +index aa2f333c..bc63395a 100644 +--- a/tests/test_oddball.py ++++ b/tests/test_oddball.py +@@ -405,7 +405,9 @@ class DoctestTest(CoverageTest): + # well with coverage. Nose fixes the problem by monkeypatching doctest. + # I want to be sure there's no monkeypatch and that I'm getting the + # doctest module that users of coverage will get. +- assert 'doctest' not in sys.modules ++ ++ # gentoo is not running these tests via nose, so there is no monkeypatching ++ #assert 'doctest' not in sys.modules + + def test_doctest(self): + self.check_coverage('''\ +diff --git a/tests/test_process.py b/tests/test_process.py +index 62dc80a5..7fa9b2ba 100644 +--- a/tests/test_process.py ++++ b/tests/test_process.py +@@ -620,11 +620,16 @@ class ProcessTest(CoverageTest): + print("FOOEY == %s" % os.getenv("FOOEY")) + """) + +- fullcov = os.path.join( +- os.path.dirname(coverage.__file__), "fullcoverage" +- ) ++ # we want to use the coverage module we are testing, not the system installation ++ paths = [ ++ os.path.join( ++ os.path.dirname(coverage.__file__), "fullcoverage" ++ ), ++ os.path.dirname(os.path.dirname(coverage.__file__)) ++ ] + self.set_environ("FOOEY", "BOO") +- self.set_environ("PYTHONPATH", fullcov) ++ self.set_environ("PYTHONPATH", ':'.join(paths)) ++ print(paths) + out = self.run_command("python -m coverage run -L getenv.py") + self.assertEqual(out, "FOOEY == BOO\n") + data = coverage.CoverageData() -- cgit v1.2.3