mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/spyder: switch pyls --> python-lsp-server
We are running into a dependency mess with pyls because it hasn't been updated for over 6 months. We can no longer wait for upstream to make the switch to their own fork of the project (though I still expect this soonish) Bug: https://bugs.gentoo.org/783618 Bug: https://bugs.gentoo.org/783615 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
This commit is contained in:
@@ -59,24 +59,22 @@ RDEPEND="
|
||||
>=dev-python/psutil-5.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pylint-1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-language-server-0.36.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-lsp-server-1.0.1[${PYTHON_USEDEP}]
|
||||
|
||||
dev-python/autopep8[${PYTHON_USEDEP}]
|
||||
>=dev-python/flake8-3.8.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
|
||||
<dev-python/mccabe-0.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycodestyle-2.6.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pydocstyle-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyflakes-2.2.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pyflakes-2.3.0[${PYTHON_USEDEP}]
|
||||
dev-python/pylint[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyflakes-2.3.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pylint-2.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/rope-0.10.5[${PYTHON_USEDEP}]
|
||||
dev-python/yapf[${PYTHON_USEDEP}]
|
||||
|
||||
<dev-python/python-language-server-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyls-black-0.4.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyls-spyder-0.3.2[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-lsp-black-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyls-spyder-0.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyxdg-0.26[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyzmq-17.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/qdarkstyle-2.8[${PYTHON_USEDEP}]
|
||||
@@ -142,6 +140,25 @@ python_prepare_all() {
|
||||
# runs against things packaged in external-deps dir
|
||||
rm conftest.py || die
|
||||
|
||||
# Use the spyder fork of pyls (python-lsp-server instead of python-language-server)
|
||||
# The original hasn't been update in over 6 months, and spyder upstream is slow
|
||||
# in making the switch. Because we are running into issues with outdated deps
|
||||
# and a whole dependency mess as a result, we can no longer wait for upstream.
|
||||
find . -name "*.py" -exec sed -i \
|
||||
-e 's/python-language-server\[all\]>=0.36.2,<1.0.0/python-lsp-server\[all\]>=1.0.0/g' \
|
||||
-e 's/python-language-server/python-lsp-server/g' \
|
||||
-e 's/python_language_server/python_lsp_server/g' \
|
||||
-e 's/python-jsonrpc-server/python-lsp-jsonrpc/g' \
|
||||
-e 's/python_jsonrpc_server/python_lsp_jsonrpc/g' \
|
||||
-e 's/pyls/pylsp/g' \
|
||||
-e 's/pylsp-spyder/pyls-spyder/g' \
|
||||
-e 's/pylsp_spyder/pyls_spyder/g' \
|
||||
-e 's/pyls-spyder>=0.3.2,<0.4.0/pyls-spyder>=0.4.0/g' \
|
||||
-e 's/pylsp-black/python-lsp-black/g' \
|
||||
-e 's/>=0.3.2;<0.4.0/>=0.4.0/g' \
|
||||
-e 's/>=0.36.2;<1.0.0/>=1.0.0/g' \
|
||||
{} + || die
|
||||
|
||||
# do not depend on pyqt5<13
|
||||
sed -i -e '/pyqt5/d' \
|
||||
-e '/pyqtwebengine/d' \
|
||||
@@ -52,11 +52,9 @@ RDEPEND="
|
||||
>=dev-python/psutil-5.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/pygments-2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pylint-1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyls-black-0.4.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyls-spyder-0.3.2[${PYTHON_USEDEP}]
|
||||
<dev-python/pyls-spyder-0.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-language-server-0.36.2[${PYTHON_USEDEP}]
|
||||
<dev-python/python-language-server-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-lsp-black-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyls-spyder-0.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-lsp-server-1.0.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyxdg-0.26[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyzmq-17[${PYTHON_USEDEP}]
|
||||
~dev-python/qdarkstyle-3.0.2[${PYTHON_USEDEP}]
|
||||
@@ -73,17 +71,16 @@ RDEPEND="
|
||||
>=dev-python/watchdog-0.10.3[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
# python-language-server[all] deps
|
||||
# python-lsp-server[all] deps
|
||||
RDEPEND+="
|
||||
dev-python/autopep8[${PYTHON_USEDEP}]
|
||||
>=dev-python/flake8-3.8.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/mccabe-0.6.0[${PYTHON_USEDEP}]
|
||||
<dev-python/mccabe-0.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycodestyle-2.6.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pydocstyle-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyflakes-2.2.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pyflakes-2.3.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyflakes-2.3.0[${PYTHON_USEDEP}]
|
||||
<dev-python/pyflakes-2.4.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/pylint-2.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/rope-0.10.5[${PYTHON_USEDEP}]
|
||||
dev-python/yapf[${PYTHON_USEDEP}]
|
||||
@@ -144,6 +141,25 @@ python_prepare_all() {
|
||||
# runs against things packaged in external-deps dir
|
||||
rm conftest.py || die
|
||||
|
||||
# Use the spyder fork of pyls (python-lsp-server instead of python-language-server)
|
||||
# The original hasn't been update in over 6 months, and spyder upstream is slow
|
||||
# in making the switch. Because we are running into issues with outdated deps
|
||||
# and a whole dependency mess as a result, we can no longer wait for upstream.
|
||||
find . -name "*.py" -exec sed -i \
|
||||
-e 's/python-language-server\[all\]>=0.36.2,<1.0.0/python-lsp-server\[all\]>=1.0.0/g' \
|
||||
-e 's/python-language-server/python-lsp-server/g' \
|
||||
-e 's/python_language_server/python_lsp_server/g' \
|
||||
-e 's/python-jsonrpc-server/python-lsp-jsonrpc/g' \
|
||||
-e 's/python_jsonrpc_server/python_lsp_jsonrpc/g' \
|
||||
-e 's/pyls/pylsp/g' \
|
||||
-e 's/pylsp-spyder/pyls-spyder/g' \
|
||||
-e 's/pylsp_spyder/pyls_spyder/g' \
|
||||
-e 's/pyls-spyder>=0.3.2,<0.4.0/pyls-spyder>=0.4.0/g' \
|
||||
-e 's/pylsp-black/python-lsp-black/g' \
|
||||
-e 's/>=0.3.2;<0.4.0/>=0.4.0/g' \
|
||||
-e 's/>=0.36.2;<1.0.0/>=1.0.0/g' \
|
||||
{} + || die
|
||||
|
||||
# do not depend on pyqt5<13
|
||||
sed -i -e '/pyqt5/d' \
|
||||
-e '/pyqtwebengine/d' \
|
||||
Reference in New Issue
Block a user