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, 02 Nov 2022 13:01:41
Message-Id: 1667394089.5886a89e573db397562eabee052d0fce0312da80.andrewammerlaan@gentoo
1 commit: 5886a89e573db397562eabee052d0fce0312da80
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 2 13:00:44 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 2 13:01:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5886a89e
7
8 dev-python/python-lsp-server: unpin all dependencies
9
10 Tested, works just fine with newer versions of all the things
11
12 Closes: https://bugs.gentoo.org/878659
13 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
14
15 ...ython-lsp-server-1.5.0-unpin-all-the-deps.patch | 42 ++++++++++
16 .../python-lsp-server-1.5.0-r1.ebuild | 91 ++++++++++++++++++++++
17 2 files changed, 133 insertions(+)
18
19 diff --git a/dev-python/python-lsp-server/files/python-lsp-server-1.5.0-unpin-all-the-deps.patch b/dev-python/python-lsp-server/files/python-lsp-server-1.5.0-unpin-all-the-deps.patch
20 new file mode 100644
21 index 000000000000..b8b3eb10f9f2
22 --- /dev/null
23 +++ b/dev-python/python-lsp-server/files/python-lsp-server-1.5.0-unpin-all-the-deps.patch
24 @@ -0,0 +1,42 @@
25 +diff --git a/pyproject.toml b/pyproject.toml
26 +index ff60a18..0c756ff 100644
27 +--- a/pyproject.toml
28 ++++ b/pyproject.toml
29 +@@ -26,26 +26,26 @@ Homepage = "https://github.com/python-lsp/python-lsp-server"
30 +
31 + [project.optional-dependencies]
32 + all = [
33 +- "autopep8>=1.6.0,<1.7.0",
34 +- "flake8>=4.0.0,<4.1.0",
35 +- "mccabe>=0.6.0,<0.7.0",
36 +- "pycodestyle>=2.8.0,<2.9.0",
37 ++ "autopep8>=1.6.0",
38 ++ "flake8>=4.0.0",
39 ++ "mccabe>=0.6.0",
40 ++ "pycodestyle>=2.8.0",
41 + "pydocstyle>=2.0.0",
42 +- "pyflakes>=2.4.0,<2.5.0",
43 ++ "pyflakes>=2.4.0",
44 + "pylint>=2.5.0",
45 + "rope>=0.10.5",
46 + "yapf",
47 + "whatthepatch"
48 + ]
49 +-autopep8 = ["autopep8>=1.6.0,<1.7.0"]
50 +-flake8 = ["flake8>=4.0.0,<4.1.0"]
51 +-mccabe = ["mccabe>=0.6.0,<0.7.0"]
52 +-pycodestyle = ["pycodestyle>=2.8.0,<2.9.0"]
53 ++autopep8 = ["autopep8>=1.6.0"]
54 ++flake8 = ["flake8>=4.0.0"]
55 ++mccabe = ["mccabe>=0.6.0"]
56 ++pycodestyle = ["pycodestyle>=2.8.0"]
57 + pydocstyle = ["pydocstyle>=2.0.0"]
58 +-pyflakes = ["pyflakes>=2.4.0,<2.5.0"]
59 ++pyflakes = ["pyflakes>=2.4.0"]
60 + pylint = ["pylint>=2.5.0"]
61 + rope = ["rope>0.10.5"]
62 +-yapf = ["yapf", "whatthepatch>=1.0.2,<2.0.0"]
63 ++yapf = ["yapf", "whatthepatch>=1.0.2"]
64 + websockets = ["websockets>=10.3"]
65 + test = [
66 + "pylint>=2.5.0",
67
68 diff --git a/dev-python/python-lsp-server/python-lsp-server-1.5.0-r1.ebuild b/dev-python/python-lsp-server/python-lsp-server-1.5.0-r1.ebuild
69 new file mode 100644
70 index 000000000000..ba5da2428f9b
71 --- /dev/null
72 +++ b/dev-python/python-lsp-server/python-lsp-server-1.5.0-r1.ebuild
73 @@ -0,0 +1,91 @@
74 +# Copyright 1999-2022 Gentoo Authors
75 +# Distributed under the terms of the GNU General Public License v2
76 +
77 +EAPI=8
78 +
79 +DISTUTILS_USE_PEP517=setuptools
80 +PYTHON_COMPAT=( python3_{8..10} )
81 +
82 +inherit distutils-r1 optfeature
83 +
84 +DESCRIPTION="Python Language Server for the Language Server Protocol"
85 +HOMEPAGE="https://github.com/python-lsp/python-lsp-server"
86 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
87 +
88 +LICENSE="MIT"
89 +SLOT="0"
90 +KEYWORDS="~amd64 ~arm64 ~x86"
91 +
92 +IUSE="all-plugins"
93 +
94 +BDEPEND="
95 + test? (
96 + >=dev-python/autopep8-1.6.0[${PYTHON_USEDEP}]
97 + dev-python/flaky[${PYTHON_USEDEP}]
98 + >=dev-python/flake8-4.0.0[${PYTHON_USEDEP}]
99 + dev-python/matplotlib[${PYTHON_USEDEP}]
100 + >=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
101 + <dev-python/numpy-1.23.0[${PYTHON_USEDEP}]
102 + dev-python/pandas[${PYTHON_USEDEP}]
103 + >=dev-python/pycodestyle-2.8.0[${PYTHON_USEDEP}]
104 + >=dev-python/pydocstyle-2.0.0[${PYTHON_USEDEP}]
105 + >=dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}]
106 + >=dev-python/pylint-2.5.0[${PYTHON_USEDEP}]
107 + dev-python/QtPy[gui,testlib,${PYTHON_USEDEP}]
108 + >=dev-python/rope-0.10.5[${PYTHON_USEDEP}]
109 + dev-python/yapf[${PYTHON_USEDEP}]
110 + >=dev-python/whatthepatch-1.0.2[${PYTHON_USEDEP}]
111 + )
112 +"
113 +
114 +RDEPEND="
115 + >=dev-python/jedi-0.17.2[${PYTHON_USEDEP}]
116 + >=dev-python/python-lsp-jsonrpc-1.0.0[${PYTHON_USEDEP}]
117 + dev-python/pluggy[${PYTHON_USEDEP}]
118 + all-plugins? (
119 + >=dev-python/autopep8-1.6.0[${PYTHON_USEDEP}]
120 + >=dev-python/flake8-4.0.0[${PYTHON_USEDEP}]
121 + >=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
122 + >=dev-python/pycodestyle-2.8.0[${PYTHON_USEDEP}]
123 + >=dev-python/pydocstyle-2.0.0[${PYTHON_USEDEP}]
124 + >=dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}]
125 + >=dev-python/pylint-2.5.0[${PYTHON_USEDEP}]
126 + >=dev-python/rope-0.10.5[${PYTHON_USEDEP}]
127 + dev-python/yapf[${PYTHON_USEDEP}]
128 + >=dev-python/whatthepatch-1.0.2[${PYTHON_USEDEP}]
129 + )
130 +"
131 +
132 +# Upstream is overly cautious, insists on pinning
133 +# dependencies to versions required by other dependencies.
134 +# i.e. pin to <dev-python/pycodestyle-2.9.0 because
135 +# dev-python/autopep8-1.6.0 requires that version.
136 +# This causes way more problems then it solves.
137 +PATCHES=(
138 + "${FILESDIR}/${P}-unpin-all-the-deps.patch"
139 +)
140 +
141 +EPYTEST_DESELECT=(
142 + # This fails because the error output has changed slightly
143 + "test/plugins/test_pylint_lint.py::test_syntax_error_pylint_py3"
144 +)
145 +
146 +distutils_enable_tests pytest
147 +
148 +python_prepare_all() {
149 + # remove pytest-cov dep
150 + sed -i -e '/addopts =/d' pyproject.toml || die
151 + distutils-r1_python_prepare_all
152 +}
153 +
154 +pkg_postinst() {
155 + optfeature "Automatically format Python code to conform to the PEP 8 style guide" dev-python/autopep8
156 + optfeature "A wrapper around PyFlakes, pep8 & mccabe" dev-python/flake8
157 + optfeature "flake8 plugin: McCabe complexity checker" dev-python/mccabe
158 + optfeature "Python style guide checker (fka pep8)" dev-python/pycodestyle
159 + optfeature "Python docstring style checker" dev-python/pydocstyle
160 + optfeature "Passive checker for Python programs" dev-python/pyflakes
161 + optfeature "Python code static checker" dev-python/pylint
162 + optfeature "Python refactoring library" dev-python/rope
163 + optfeature "A formatter for Python files" dev-python/yapf
164 +}