diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-08-22 23:05:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-22 23:05:55 +0200 |
commit | 7a1ab4f05f6f78bc82798034516e5b736ba4593b (patch) | |
tree | f67984a75b15601731c67df1fc9e3ac97ed360df | |
parent | 06bc3335d6debc11ffc003fc5d5d2dfa44fcf1b5 (diff) | |
parent | 3e3938a6650ef1963074fe88598d5ee59978ccd5 (diff) | |
download | nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.tar nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.tar.gz nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.tar.bz2 nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.tar.lz nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.tar.xz nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.tar.zst nixpkgs-7a1ab4f05f6f78bc82798034516e5b736ba4593b.zip |
Merge pull request #135276 from figsoda/pylsp-opt-deps
python3Packages.python-lsp-server: make some dependencies optional
-rw-r--r-- | pkgs/development/python-modules/python-lsp-server/default.nix | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index c1a2de0a079..5d13a50a11f 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -22,6 +22,15 @@ , setuptools , ujson , yapf +, withAutopep8 ? true +, withFlake8 ? true +, withMccabe ? true +, withPycodestyle ? true +, withPydocstyle ? true +, withPyflakes ? true +, withPylint ? true +, withRope ? true +, withYapf ? true }: buildPythonPackage rec { @@ -37,21 +46,20 @@ buildPythonPackage rec { }; 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" "" \ |