From 789fcd7be280e5fa36c332c197f06eabd8eac632 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Sep 2023 10:41:21 +0200 Subject: [PATCH 1/2] python311Packages.python-lsp-jsonrpc: 1.0.0 -> 1.1.1 Diff: https://github.com/python-lsp/python-lsp-jsonrpc/compare/refs/tags/v1.0.0...v1.1.1 Changelog: https://github.com/python-lsp/python-lsp-jsonrpc/blob/v1.1.1/CHANGELOG.md --- .../python-lsp-jsonrpc/default.nix | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix b/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix index d45febae139c..51385c464342 100644 --- a/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix +++ b/pkgs/development/python-modules/python-lsp-jsonrpc/default.nix @@ -2,20 +2,38 @@ , buildPythonPackage , fetchFromGitHub , pytestCheckHook +, pythonOlder +, setuptools +, setuptools-scm , ujson }: buildPythonPackage rec { pname = "python-lsp-jsonrpc"; - version = "1.0.0"; + version = "1.1.1"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "python-lsp"; repo = pname; - rev = "v${version}"; - sha256 = "0h4bs8s4axcm0p02v59amz9sq3nr4zhzdgwq7iaw6awl27v1hd0i"; + rev = "refs/tags/v${version}"; + hash = "sha256-XTvnDTaP5oweGSq1VItq+SEv7S/LrQq4YP1XQc3bxbk="; }; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--cov-report html --cov-report term --junitxml=pytest.xml --cov pylsp_jsonrpc --cov test" "" + ''; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + propagatedBuildInputs = [ ujson ]; @@ -24,17 +42,14 @@ buildPythonPackage rec { pytestCheckHook ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ - --replace "--cov pylsp_jsonrpc --cov test" "" - ''; - - pythonImportsCheck = [ "pylsp_jsonrpc" ]; + pythonImportsCheck = [ + "pylsp_jsonrpc" + ]; meta = with lib; { - description = "Python server implementation of the JSON RPC 2.0 protocol."; + description = "Python server implementation of the JSON RPC 2.0 protocol"; homepage = "https://github.com/python-lsp/python-lsp-jsonrpc"; + changelog = "https://github.com/python-lsp/python-lsp-jsonrpc/blob/v${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ fab ]; }; From 25b1e638f40f40c0ec217d5aaaeb16e92e5a7ca5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Sep 2023 10:46:30 +0200 Subject: [PATCH 2/2] python311Packages.python-lsp-server: 1.7.4 -> 1.8.0 Diff: https://github.com/python-lsp/python-lsp-server/compare/refs/tags/v1.734...v1.8.0 Changelog: https://github.com/python-lsp/python-lsp-server/blob/v1.8.0/CHANGELOG.md --- .../python-lsp-server/default.nix | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index 2dca97b7f858..a74ebb5b5bb9 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -4,9 +4,9 @@ , buildPythonPackage , docstring-to-markdown , fetchFromGitHub -, fetchpatch , flake8 , flaky +, importlib-metadata , jedi , matplotlib , mccabe @@ -19,9 +19,9 @@ , pylint , pyqt5 , pytestCheckHook -, pythonRelaxDepsHook , python-lsp-jsonrpc , pythonOlder +, pythonRelaxDepsHook , rope , setuptools , setuptools-scm @@ -35,27 +35,18 @@ buildPythonPackage rec { pname = "python-lsp-server"; - version = "1.7.4"; + version = "1.8.0"; format = "pyproject"; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "python-lsp"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-plciPUROFileVULGBZpwUTkW2NZVHy4Nuf4+fSjd8nM="; + hash = "sha256-hLgMGZumuNY70/qyD9t5pMpYI/g70sqFIt1LEfIEALY="; }; - patches = [ - # https://github.com/python-lsp/python-lsp-server/pull/416 - (fetchpatch { - name = "bump-jedi-upper-pin-to-0.20.patch"; - url = "https://github.com/python-lsp/python-lsp-server/commit/f33a93afc8c3a0f16751f9e1f6601a37967fd7df.patch"; - hash = "sha256-lBpzXxjlQp2ig0z2DRJw+jQZ5eRLIOJYjGrzfgvknDA="; - }) - ]; - postPatch = '' substituteInPlace pyproject.toml \ --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ @@ -86,6 +77,8 @@ buildPythonPackage rec { python-lsp-jsonrpc setuptools # `pkg_resources`imported in pylsp/config/config.py ujson + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata ]; passthru.optional-dependencies = {