1 |
commit: f457bfcfc24c0b5d9403433817eaaeabc950e8af |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 16 13:42:19 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 16 13:43:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f457bfcf |
7 |
|
8 |
dev-python/flake8: allow mccabe-0.7, enable py3.11 |
9 |
|
10 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
11 |
|
12 |
.../flake8/files/flake8-4.0.1-upgrade-mccabe.patch | 13 ++++++ |
13 |
dev-python/flake8/flake8-4.0.1-r2.ebuild | 47 ++++++++++++++++++++++ |
14 |
2 files changed, 60 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/flake8/files/flake8-4.0.1-upgrade-mccabe.patch b/dev-python/flake8/files/flake8-4.0.1-upgrade-mccabe.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..5dab4af913fe |
19 |
--- /dev/null |
20 |
+++ b/dev-python/flake8/files/flake8-4.0.1-upgrade-mccabe.patch |
21 |
@@ -0,0 +1,13 @@ |
22 |
+diff --git a/setup.cfg b/setup.cfg |
23 |
+index 9cbc9b3..732d6a2 100644 |
24 |
+--- a/setup.cfg |
25 |
++++ b/setup.cfg |
26 |
+@@ -35,7 +35,7 @@ packages = find: |
27 |
+ package_dir = |
28 |
+ =src |
29 |
+ install_requires = |
30 |
+- mccabe>=0.6.0,<0.7.0 |
31 |
++ mccabe>=0.7.0,<0.8.0 |
32 |
+ pycodestyle>=2.8.0,<2.9.0 |
33 |
+ pyflakes>=2.4.0,<2.5.0 |
34 |
+ importlib-metadata<4.3;python_version<"3.8" |
35 |
|
36 |
diff --git a/dev-python/flake8/flake8-4.0.1-r2.ebuild b/dev-python/flake8/flake8-4.0.1-r2.ebuild |
37 |
new file mode 100644 |
38 |
index 000000000000..ffca3f6b10e0 |
39 |
--- /dev/null |
40 |
+++ b/dev-python/flake8/flake8-4.0.1-r2.ebuild |
41 |
@@ -0,0 +1,47 @@ |
42 |
+# Copyright 1999-2022 Gentoo Authors |
43 |
+# Distributed under the terms of the GNU General Public License v2 |
44 |
+ |
45 |
+EAPI=8 |
46 |
+ |
47 |
+PYTHON_COMPAT=( pypy3 python3_{8..11} ) |
48 |
+DISTUTILS_USE_PEP517=setuptools |
49 |
+inherit distutils-r1 |
50 |
+ |
51 |
+DESCRIPTION="A wrapper around PyFlakes, pep8 & mccabe" |
52 |
+HOMEPAGE="https://gitlab.com/pycqa/flake8 https://pypi.org/project/flake8/" |
53 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
54 |
+ |
55 |
+LICENSE="MIT" |
56 |
+SLOT="0" |
57 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos" |
58 |
+ |
59 |
+# requires.txt inc. mccabe however that creates a circular dep |
60 |
+RDEPEND=" |
61 |
+ >=dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}] |
62 |
+ <dev-python/pyflakes-2.5.0[${PYTHON_USEDEP}] |
63 |
+ >=dev-python/pycodestyle-2.8.0[${PYTHON_USEDEP}] |
64 |
+ <dev-python/pycodestyle-2.9.0[${PYTHON_USEDEP}] |
65 |
+" |
66 |
+PDEPEND=" |
67 |
+ >=dev-python/mccabe-0.7.0[${PYTHON_USEDEP}] |
68 |
+ <dev-python/mccabe-0.8.0[${PYTHON_USEDEP}] |
69 |
+ |
70 |
+" |
71 |
+BDEPEND="${RDEPEND} |
72 |
+ test? ( |
73 |
+ ${PDEPEND} |
74 |
+ ) |
75 |
+" |
76 |
+ |
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}/${P}-upgrade-mccabe.patch" |
79 |
+) |
80 |
+ |
81 |
+distutils_enable_sphinx docs/source dev-python/sphinx-prompt dev-python/sphinx_rtd_theme |
82 |
+distutils_enable_tests pytest |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ # remove version-limited dep |
86 |
+ sed -i -e '/importlib-metadata/d' setup.cfg || die |
87 |
+ distutils-r1_src_prepare |
88 |
+} |