about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-lsp-server
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/python-modules/python-lsp-server
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-lsp-server')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix24
1 files changed, 16 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix b/nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix
index 313524351658..eafad1a9ab09 100644
--- a/nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix
@@ -20,8 +20,10 @@
 , pythonOlder
 , rope
 , setuptools
+, setuptools-scm
 , stdenv
 , ujson
+, whatthepatch
 , yapf
 , withAutopep8 ? true
 , withFlake8 ? true
@@ -36,21 +38,27 @@
 
 buildPythonPackage rec {
   pname = "python-lsp-server";
-  version = "1.3.3";
+  version = "1.5.0";
+  format = "pyproject";
 
   disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "python-lsp";
     repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-F8f9NAjPWkm01D/KwFH0oA6nQ3EF4ZVCCckZTL4A35Y=";
+    rev = "refs/tags/v${version}";
+    sha256 = "sha256-tW2w94HI6iy8vcDb5pIL79bAO6BJp9q6SMAXgiVobm0=";
   };
 
   postPatch = ''
-    substituteInPlace setup.cfg \
+    substituteInPlace pyproject.toml \
       --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \
-      --replace "--cov pylsp --cov test" ""
+      --replace "--cov pylsp --cov test" "" \
+      --replace "mccabe>=0.6.0,<0.7.0" "mccabe"
+  '';
+
+  preBuild = ''
+    export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
   '';
 
   propagatedBuildInputs = [
@@ -58,6 +66,7 @@ buildPythonPackage rec {
     pluggy
     python-lsp-jsonrpc
     setuptools
+    setuptools-scm
     ujson
   ] ++ lib.optional withAutopep8 autopep8
   ++ lib.optional withFlake8 flake8
@@ -67,7 +76,7 @@ buildPythonPackage rec {
   ++ lib.optional withPyflakes pyflakes
   ++ lib.optional withPylint pylint
   ++ lib.optional withRope rope
-  ++ lib.optional withYapf yapf;
+  ++ lib.optionals withYapf [ whatthepatch yapf ];
 
   checkInputs = [
     flaky
@@ -80,8 +89,7 @@ buildPythonPackage rec {
   ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ pyqt5 ];
 
   disabledTests = [
-    # pytlint output changed
-    "test_lint_free_pylint"
+    "test_numpy_completions" # https://github.com/python-lsp/python-lsp-server/issues/243
   ] ++ lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config"
   # pyqt5 is broken on aarch64-darwin
   ++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) "test_pyqt_completion";