Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-lsp-server/, dev-python/python-lsp-server/files/
Date: Wed, 29 Jun 2022 19:19:43
Message-Id: 1656530361.b5b3570793227568ad0450616e2bbbd2ec053890.andrewammerlaan@gentoo
1 commit: b5b3570793227568ad0450616e2bbbd2ec053890
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 19:16:24 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 19:19:21 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5b35707
7
8 dev-python/python-lsp-server: allow mccabe 0.7
9
10 Tests pass just fine with mccabe-0.7.0.
11
12 And restrict to numpy<1.23.0:
13 https://github.com/python-lsp/python-lsp-server/pull/231
14 Because it makes the tests fail
15
16 Closes: https://bugs.gentoo.org/855095
17 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
18
19 .../python-lsp-server-1.4.1-allow-mccabe-0.7.patch | 22 ++++++
20 .../python-lsp-server-1.4.1-r1.ebuild | 90 ++++++++++++++++++++++
21 2 files changed, 112 insertions(+)
22
23 diff --git a/dev-python/python-lsp-server/files/python-lsp-server-1.4.1-allow-mccabe-0.7.patch b/dev-python/python-lsp-server/files/python-lsp-server-1.4.1-allow-mccabe-0.7.patch
24 new file mode 100644
25 index 000000000000..a31201ab6b15
26 --- /dev/null
27 +++ b/dev-python/python-lsp-server/files/python-lsp-server-1.4.1-allow-mccabe-0.7.patch
28 @@ -0,0 +1,22 @@
29 +diff --git a/setup.cfg b/setup.cfg
30 +index 156145f..c46fcf3 100644
31 +--- a/setup.cfg
32 ++++ b/setup.cfg
33 +@@ -26,7 +26,7 @@ exclude = contrib; docs; test; test.*; test.plugins; test.plugins.*
34 + all =
35 + autopep8>=1.6.0,<1.7.0
36 + flake8>=4.0.0,<4.1.0
37 +- mccabe>=0.6.0,<0.7.0
38 ++ mccabe>=0.6.0,<0.8.0
39 + pycodestyle>=2.8.0,<2.9.0
40 + pydocstyle>=2.0.0
41 + pyflakes>=2.4.0,<2.5.0
42 +@@ -35,7 +35,7 @@ all =
43 + yapf
44 + autopep8 = autopep8>=1.6.0,<1.7.0
45 + flake8 = flake8>=4.0.0,<4.1.0
46 +-mccabe = mccabe>=0.6.0,<0.7.0
47 ++mccabe = mccabe>=0.6.0,<0.8.0
48 + pycodestyle = pycodestyle>=2.8.0,<2.9.0
49 + pydocstyle = pydocstyle>=2.0.0
50 + pyflakes = pyflakes>=2.4.0,<2.5.0
51
52 diff --git a/dev-python/python-lsp-server/python-lsp-server-1.4.1-r1.ebuild b/dev-python/python-lsp-server/python-lsp-server-1.4.1-r1.ebuild
53 new file mode 100644
54 index 000000000000..40340f78ae9d
55 --- /dev/null
56 +++ b/dev-python/python-lsp-server/python-lsp-server-1.4.1-r1.ebuild
57 @@ -0,0 +1,90 @@
58 +# Copyright 1999-2022 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=8
62 +
63 +DISTUTILS_USE_PEP517=setuptools
64 +PYTHON_COMPAT=( python3_{8..10} )
65 +
66 +inherit distutils-r1 optfeature
67 +
68 +DESCRIPTION="Python Language Server for the Language Server Protocol"
69 +HOMEPAGE="https://github.com/python-lsp/python-lsp-server"
70 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
71 +
72 +LICENSE="MIT"
73 +SLOT="0"
74 +KEYWORDS="~amd64 ~arm64 ~x86"
75 +
76 +IUSE="all-plugins"
77 +
78 +BDEPEND="
79 + test? (
80 + >=dev-python/autopep8-1.6.0[${PYTHON_USEDEP}]
81 + <dev-python/autopep8-1.7.0[${PYTHON_USEDEP}]
82 + dev-python/flaky[${PYTHON_USEDEP}]
83 + >=dev-python/flake8-4.0.0[${PYTHON_USEDEP}]
84 + <dev-python/flake8-4.1.0[${PYTHON_USEDEP}]
85 + dev-python/matplotlib[${PYTHON_USEDEP}]
86 + >=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
87 + <dev-python/mccabe-0.8.0[${PYTHON_USEDEP}]
88 + <dev-python/numpy-1.23.0[${PYTHON_USEDEP}]
89 + dev-python/pandas[${PYTHON_USEDEP}]
90 + >=dev-python/pycodestyle-2.8.0[${PYTHON_USEDEP}]
91 + <dev-python/pycodestyle-2.9.0[${PYTHON_USEDEP}]
92 + >=dev-python/pydocstyle-2.0.0[${PYTHON_USEDEP}]
93 + >=dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}]
94 + <dev-python/pyflakes-2.5.0[${PYTHON_USEDEP}]
95 + >=dev-python/pylint-2.5.0[${PYTHON_USEDEP}]
96 + dev-python/QtPy[gui,testlib,${PYTHON_USEDEP}]
97 + >=dev-python/rope-0.10.5[${PYTHON_USEDEP}]
98 + dev-python/yapf[${PYTHON_USEDEP}]
99 + )
100 +"
101 +
102 +RDEPEND="
103 + >=dev-python/jedi-0.17.2[${PYTHON_USEDEP}]
104 + <dev-python/jedi-0.19.0[${PYTHON_USEDEP}]
105 + >=dev-python/python-lsp-jsonrpc-1.0.0[${PYTHON_USEDEP}]
106 + dev-python/pluggy[${PYTHON_USEDEP}]
107 + all-plugins? (
108 + >=dev-python/autopep8-1.6.0[${PYTHON_USEDEP}]
109 + <dev-python/autopep8-1.7.0[${PYTHON_USEDEP}]
110 + >=dev-python/flake8-4.0.0[${PYTHON_USEDEP}]
111 + <dev-python/flake8-4.1.0[${PYTHON_USEDEP}]
112 + >=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
113 + <dev-python/mccabe-0.8.0[${PYTHON_USEDEP}]
114 + >=dev-python/pycodestyle-2.8.0[${PYTHON_USEDEP}]
115 + <dev-python/pycodestyle-2.9.0[${PYTHON_USEDEP}]
116 + >=dev-python/pydocstyle-2.0.0[${PYTHON_USEDEP}]
117 + >=dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}]
118 + <dev-python/pyflakes-2.5.0[${PYTHON_USEDEP}]
119 + >=dev-python/pylint-2.5.0[${PYTHON_USEDEP}]
120 + >=dev-python/rope-0.10.5[${PYTHON_USEDEP}]
121 + dev-python/yapf[${PYTHON_USEDEP}]
122 + )
123 +"
124 +
125 +PATCHES=(
126 + "${FILESDIR}/${P}-allow-mccabe-0.7.patch"
127 +)
128 +
129 +distutils_enable_tests pytest
130 +
131 +python_prepare_all() {
132 + # remove pytest-cov dep
133 + sed -i -e '0,/addopts/I!d' setup.cfg || die
134 + distutils-r1_python_prepare_all
135 +}
136 +
137 +pkg_postinst() {
138 + optfeature "Automatically format Python code to conform to the PEP 8 style guide" dev-python/autopep8
139 + optfeature "A wrapper around PyFlakes, pep8 & mccabe" dev-python/flake8
140 + optfeature "flake8 plugin: McCabe complexity checker" dev-python/mccabe
141 + optfeature "Python style guide checker (fka pep8)" dev-python/pycodestyle
142 + optfeature "Python docstring style checker" dev-python/pydocstyle
143 + optfeature "Passive checker for Python programs" dev-python/pyflakes
144 + optfeature "Python code static checker" dev-python/pylint
145 + optfeature "Python refactoring library" dev-python/rope
146 + optfeature "A formatter for Python files" dev-python/yapf
147 +}