From 2ceb5b69d8cacf9dcefb5b6037e623b7ed5f13f3 Mon Sep 17 00:00:00 2001 From: Joel Date: Sat, 30 Jul 2022 09:52:46 +1000 Subject: [PATCH] python-lsp-server: fix build --- .../python-modules/python-lsp-server/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index 41af2ad8e3ef..eafad1a9ab09 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -23,6 +23,7 @@ , setuptools-scm , stdenv , ujson +, whatthepatch , yapf , withAutopep8 ? true , withFlake8 ? true @@ -50,7 +51,7 @@ buildPythonPackage rec { }; postPatch = '' - substituteInPlace setup.cfg \ + substituteInPlace pyproject.toml \ --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ --replace "--cov pylsp --cov test" "" \ --replace "mccabe>=0.6.0,<0.7.0" "mccabe" @@ -75,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 @@ -87,7 +88,9 @@ buildPythonPackage rec { # pyqt5 is broken on aarch64-darwin ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ pyqt5 ]; - disabledTests = lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config" + disabledTests = [ + "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";