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