pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/py-lsp-server



Module Name:    pkgsrc
Committed By:   wiz
Date:           Fri Nov  5 15:58:23 UTC 2021

Modified Files:
        pkgsrc/lang/py-lsp-server: Makefile distinfo
Added Files:
        pkgsrc/lang/py-lsp-server/patches: patch-pylsp_plugins_flake8__lint.py

Log Message:
py-lsp-server: fix 5/7 failing tests.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/py-lsp-server/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/py-lsp-server/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/py-lsp-server/patches/patch-pylsp_plugins_flake8__lint.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/py-lsp-server/Makefile
diff -u pkgsrc/lang/py-lsp-server/Makefile:1.2 pkgsrc/lang/py-lsp-server/Makefile:1.3
--- pkgsrc/lang/py-lsp-server/Makefile:1.2      Fri Nov  5 13:18:00 2021
+++ pkgsrc/lang/py-lsp-server/Makefile  Fri Nov  5 15:58:23 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2021/11/05 13:18:00 adam Exp $
+# $NetBSD: Makefile,v 1.3 2021/11/05 15:58:23 wiz Exp $
 
 DISTNAME=      python-lsp-server-1.2.4
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/python-//}
@@ -34,6 +34,12 @@ TEST_DEPENDS+=       ${PYPKGPREFIX}-flaky-[0-9
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27 # py-pylint, py-parso via py-jedi
 
+SUBST_CLASSES+=                pylint
+SUBST_FILES.pylint+=   test/plugins/test_pylint_lint.py
+SUBST_STAGE.pylint=    pre-build
+SUBST_MESSAGE.pylint=  Fix pylint executable name.
+SUBST_SED.pylint=      -e "s/'pylint'$$/'pylint-${PYVERSSUFFIX}'/"
+
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && \
        ${MV} pylsp pylsp-${PYVERSSUFFIX} || ${TRUE}

Index: pkgsrc/lang/py-lsp-server/distinfo
diff -u pkgsrc/lang/py-lsp-server/distinfo:1.1 pkgsrc/lang/py-lsp-server/distinfo:1.2
--- pkgsrc/lang/py-lsp-server/distinfo:1.1      Fri Nov  5 12:36:15 2021
+++ pkgsrc/lang/py-lsp-server/distinfo  Fri Nov  5 15:58:23 2021
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1 2021/11/05 12:36:15 wiz Exp $
+$NetBSD: distinfo,v 1.2 2021/11/05 15:58:23 wiz Exp $
 
 BLAKE2s (python-lsp-server-1.2.4.tar.gz) = 573b63907c47a50b0c3c4c257d9d2a75c4bf3af7af2ca9bb9b9a99092a51ba13
 SHA512 (python-lsp-server-1.2.4.tar.gz) = 862d59426c6e7c19f9d3d2766ec5f9ec818d29988ee72cde9553e4b1725fbbe4230ed2f6d7e8d08983c9ef1ced8d5afe42d6751ea529d3d8799c8930b1e10a26
 Size (python-lsp-server-1.2.4.tar.gz) = 62073 bytes
+SHA1 (patch-pylsp_plugins_flake8__lint.py) = 56907a886c2521ebb607654488fb456ae8f6b02c

Added files:

Index: pkgsrc/lang/py-lsp-server/patches/patch-pylsp_plugins_flake8__lint.py
diff -u /dev/null pkgsrc/lang/py-lsp-server/patches/patch-pylsp_plugins_flake8__lint.py:1.1
--- /dev/null   Fri Nov  5 15:58:23 2021
+++ pkgsrc/lang/py-lsp-server/patches/patch-pylsp_plugins_flake8__lint.py       Fri Nov  5 15:58:23 2021
@@ -0,0 +1,26 @@
+$NetBSD: patch-pylsp_plugins_flake8__lint.py,v 1.1 2021/11/05 15:58:23 wiz Exp $
+
+Fix unportable interpreter name.
+https://github.com/python-lsp/python-lsp-server/pull/111
+
+--- pylsp/plugins/flake8_lint.py.orig  2021-06-25 21:26:52.000000000 +0000
++++ pylsp/plugins/flake8_lint.py
+@@ -5,6 +5,7 @@
+ import logging
+ import os.path
+ import re
++import sys
+ from pathlib import PurePath
+ from subprocess import PIPE, Popen
+ 
+@@ -81,8 +82,8 @@ def run_flake8(flake8_executable, args, 
+         cmd.extend(args)
+         p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)  # pylint: disable=consider-using-with
+     except IOError:
+-        log.debug("Can't execute %s. Trying with 'python -m flake8'", flake8_executable)
+-        cmd = ['python', '-m', 'flake8']
++        log.debug("Can't execute %s. Trying with '" + sys.executable + " -m flake8'", flake8_executable)
++        cmd = [sys.executable, '-m', 'flake8']
+         cmd.extend(args)
+         p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)  # pylint: disable=consider-using-with
+     (stdout, stderr) = p.communicate(document.source.encode())



Home | Main Index | Thread Index | Old Index