summaryrefslogtreecommitdiff
path: root/dev-python/flake8
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /dev-python/flake8
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'dev-python/flake8')
-rw-r--r--dev-python/flake8/Manifest3
-rw-r--r--dev-python/flake8/files/flake8-3.8.3-pytest6.patch40
-rw-r--r--dev-python/flake8/flake8-3.8.3-r1.ebuild47
3 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/flake8/Manifest b/dev-python/flake8/Manifest
index 803859105d4c..c1acb886a35b 100644
--- a/dev-python/flake8/Manifest
+++ b/dev-python/flake8/Manifest
@@ -1,3 +1,6 @@
+AUX flake8-3.8.3-pytest6.patch 1883 BLAKE2B bd4eb8f184636bfbc33b262df8c5612402a1741670531068f2ca9d15f03633e27030819c6b9549ba88bc8c37307a65a0b714e48e4c846e73b80d31578c49d8c2 SHA512 7179106e01f1562d7dbeb3b4e2b4285bbbe29373f776e0d03aecc5e5c44b2e650016ed34409935a66184bb1ab9e6828e0c46f7c65526a6ac44c2a0885354e18f
DIST flake8-3.8.1.tar.gz 157166 BLAKE2B cc8b2dc11f78a6b9c62662086cc190a29a0a4e5a228d4823de8e2f3f327cea3e5df4db220faf9cc14fa34e3825b7d1e4fc4ccf9d1205b437903f327f3ebfa7bb SHA512 f73a306be7d8e5bc48dd9d6d8f8cdee07a90c6c38ee7bd37a21f4be23f1812e4a1e214cc75ca1a324f40e750312b5d7ed573ff49d673f9a1f33aad188b108add
+DIST flake8-3.8.3.tar.gz 162305 BLAKE2B 7211c9ff99ce2e8e3094e6a7a1917ee1b3d61902a45408b9c84f077097af8d1b0571e27209ed78409c9931ff53fdb660f81d1886773b8ef74ceb0bd3de60420c SHA512 007158ea5caf60ff84e935f1b74a5f746fba00991c8808395ff72126dc1a8c8e135badc6f1f383027349076b8f3e146e9d0af27b6e24cdf97390463fd69ad940
EBUILD flake8-3.8.1.ebuild 1370 BLAKE2B dea3b7d66efcbb3097ac81e75cd0d76910ea424fee8017e7ae9cde2804858da1f0476a422403b00b17d476eba997afe96b393fd119d25d209ff2e43b72a337f4 SHA512 ea4e8d513f18033b12ee674a16328d41dad86590706623987c379871249b54ffb2527bca1ef0a8a5c5ff661655cef6a7cc9113573d2d4d498472de9568c1a9bf
+EBUILD flake8-3.8.3-r1.ebuild 1363 BLAKE2B c9e8b94f7f0c3b5b6a316f7e02003d8dafae26067aa8d1b56d51a625023a98be25469272acca71816e21a7a51dee6a3d9c2352196d5ca0bd22714ae51d5c2d0c SHA512 3cf0861ba2c5f99700d421425dab7d087a398f136379ad406c4e67d346b26f9f62c4fe0ec016d954843b110608b657e30b1e3f48705232e89e89039eb7877a70
MISC metadata.xml 398 BLAKE2B 5a71d80adb94073494d12eb93722d21593a388b4f4cb47ad8ce1e8d053f24d1597c36743e720dabbc023f9318039b45b0b1ddc22d86455394b72789ab0c5e988 SHA512 823dbd0877b3ac042e5c51f260cb0f3d3490383a4975d7bf2267898cad7e3366a693be270d2eb9c8dcea8b7f66d1e6a3343b7a4be5c1b8f0fff8ffe514952e5a
diff --git a/dev-python/flake8/files/flake8-3.8.3-pytest6.patch b/dev-python/flake8/files/flake8-3.8.3-pytest6.patch
new file mode 100644
index 000000000000..78e7391d0379
--- /dev/null
+++ b/dev-python/flake8/files/flake8-3.8.3-pytest6.patch
@@ -0,0 +1,40 @@
+commit 91b09d5b376cfb8afd4b6af5b407f57aa42011c7
+Author: Miro HronĨok <miro@hroncok.cz>
+Date: Mon Jul 20 13:18:23 2020 +0200
+
+ Tests: Add a value to mocked entry_points, so pytest 6+ can log it
+
+ Pytest 6.0.0rc1 attempts to log a repr of our mocked entry_point,
+ but it fails, becasue the repr metohod expects a valua attribute:
+
+ Reproducer:
+
+ $ tox -e py38 --force-dep 'pytest==6.0.0rc1'
+ ...
+ Traceback (most recent call last):
+ File "/usr/lib/python3.8/logging/__init__.py", line 1081, in emit
+ msg = self.format(record)
+ File "/usr/lib/python3.8/logging/__init__.py", line 925, in format
+ return fmt.format(record)
+ File "/usr/lib/python3.8/logging/__init__.py", line 664, in format
+ record.message = record.getMessage()
+ File "/usr/lib/python3.8/logging/__init__.py", line 369, in getMessage
+ msg = msg % self.args
+ File "/tmp/flake8/.tox/py38/lib/python3.8/site-packages/flake8/plugins/manager.py", line 44, in __repr__
+ self.name, self.entry_point.value
+ File "/tmp/flake8/.tox/py38/lib/python3.8/site-packages/mock/mock.py", line 632, in __getattr__
+ raise AttributeError("Mock object has no attribute %r" % name)
+ AttributeError: Mock object has no attribute 'value'
+
+diff --git a/tests/integration/test_checker.py b/tests/integration/test_checker.py
+index eaab5c3..0acdb6e 100644
+--- a/tests/integration/test_checker.py
++++ b/tests/integration/test_checker.py
+@@ -100,6 +100,7 @@ def mock_file_checker_with_plugin(plugin_target):
+ entry_point = mock.Mock(spec=['load'])
+ entry_point.name = plugin_target.name
+ entry_point.load.return_value = plugin_target
++ entry_point.value = 'mocked:value'
+
+ # Load the checker plugins using the entry point mock
+ with mock.patch.object(
diff --git a/dev-python/flake8/flake8-3.8.3-r1.ebuild b/dev-python/flake8/flake8-3.8.3-r1.ebuild
new file mode 100644
index 000000000000..7f9df80e88f1
--- /dev/null
+++ b/dev-python/flake8/flake8-3.8.3-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( pypy3 python3_{6..9} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+
+inherit distutils-r1
+
+DESCRIPTION="A wrapper around PyFlakes, pep8 & mccabe"
+HOMEPAGE="https://gitlab.com/pycqa/flake8 https://pypi.org/project/flake8/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86"
+
+# requires.txt inc. mccabe however that creates a circular dep
+RDEPEND="
+ >=dev-python/pyflakes-2.2.0[${PYTHON_USEDEP}]
+ <dev-python/pyflakes-2.3.0[${PYTHON_USEDEP}]
+ >=dev-python/pycodestyle-2.6.0[${PYTHON_USEDEP}]
+ <dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/importlib_metadata[${PYTHON_USEDEP}]' pypy3 python3_{6,7})
+"
+PDEPEND="
+ >=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
+ <dev-python/mccabe-0.7.0[${PYTHON_USEDEP}]
+"
+BDEPEND="${RDEPEND}
+ test? (
+ ${PDEPEND}
+ >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=( "${FILESDIR}/${P}-pytest6.patch" )
+
+distutils_enable_sphinx docs/source dev-python/sphinx-prompt dev-python/sphinx_rtd_theme
+distutils_enable_tests pytest
+
+python_test() {
+ # Otherwise some tests fail if the package isn't installed
+ distutils_install_for_testing
+ pytest -vv || die "Tests fail with ${EPYTHON}"
+}