diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix | 45 |
1 files changed, 33 insertions, 12 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 90ab506d651f..5d13a50a11fd 100644 --- a/nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/nixpkgs/pkgs/development/python-modules/python-lsp-server/default.nix @@ -22,36 +22,44 @@ , setuptools , ujson , yapf +, withAutopep8 ? true +, withFlake8 ? true +, withMccabe ? true +, withPycodestyle ? true +, withPydocstyle ? true +, withPyflakes ? true +, withPylint ? true +, withRope ? true +, withYapf ? true }: buildPythonPackage rec { pname = "python-lsp-server"; - version = "1.1.0"; + version = "1.2.1"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "python-lsp"; repo = pname; rev = "v${version}"; - sha256 = "1akdpfnylqg2mcwpkqmdwcg6j6hab23slp5rfjfidhphig2f2yjv"; + sha256 = "sha256-TyXKlXeXMyq+bQq9ngDm0SuW+rAhDlOVlC3mDI1THwk="; }; propagatedBuildInputs = [ - autopep8 - flake8 jedi - mccabe pluggy - pycodestyle - pydocstyle - pyflakes - pylint python-lsp-jsonrpc - rope setuptools ujson - yapf - ]; + ] ++ lib.optional withAutopep8 autopep8 + ++ lib.optional withFlake8 flake8 + ++ lib.optional withMccabe mccabe + ++ lib.optional withPycodestyle pycodestyle + ++ lib.optional withPydocstyle pydocstyle + ++ lib.optional withPyflakes pyflakes + ++ lib.optional withPylint pylint + ++ lib.optional withRope rope + ++ lib.optional withYapf yapf; checkInputs = [ flaky @@ -62,6 +70,19 @@ buildPythonPackage rec { pytestCheckHook ]; + disabledTests = lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config"; + + disabledTestPaths = lib.optional (!withAutopep8) "test/plugins/test_autopep8_format.py" + ++ lib.optional (!withRope) "test/plugins/test_completion.py" + ++ lib.optional (!withFlake8) "test/plugins/test_flake8_lint.py" + ++ lib.optional (!withMccabe) "test/plugins/test_mccabe_lint.py" + ++ lib.optional (!withPycodestyle) "test/plugins/test_pycodestyle_lint.py" + ++ lib.optional (!withPydocstyle) "test/plugins/test_pydocstyle_lint.py" + ++ lib.optional (!withPyflakes) "test/plugins/test_pyflakes_lint.py" + ++ lib.optional (!withPylint) "test/plugins/test_pylint_lint.py" + ++ lib.optional (!withRope) "test/plugins/test_rope_rename.py" + ++ lib.optional (!withYapf) "test/plugins/test_yapf_format.py"; + postPatch = '' substituteInPlace setup.cfg \ --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ |