Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id E49731A9239 for ; Fri, 5 Nov 2021 15:58:25 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id F2CCD84F41; Fri, 5 Nov 2021 15:58:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 352DF84E7A for ; Fri, 5 Nov 2021 15:58:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id X1zAinS1YS09 for ; Fri, 5 Nov 2021 15:58:23 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 879D484D0E for ; Fri, 5 Nov 2021 15:58:23 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 7A705FAEC; Fri, 5 Nov 2021 15:58:23 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1636127903287950" MIME-Version: 1.0 Date: Fri, 5 Nov 2021 15:58:23 +0000 From: "Thomas Klausner" Subject: CVS commit: pkgsrc/lang/py-lsp-server To: pkgsrc-changes@NetBSD.org Reply-To: wiz@netbsd.org X-Mailer: log_accum Message-Id: <20211105155823.7A705FAEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1636127903287950 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1636127903287950 Content-Disposition: inline Content-Length: 3228 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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()) --_----------=_1636127903287950--