Merge pull request #135276 from figsoda/pylsp-opt-deps

python3Packages.python-lsp-server: make some dependencies optional

authored by

Sandro and committed by
GitHub
7a1ab4f0 06bc3335

+31 -10
+31 -10
pkgs/development/python-modules/python-lsp-server/default.nix
··· 22 22 , setuptools 23 23 , ujson 24 24 , yapf 25 + , withAutopep8 ? true 26 + , withFlake8 ? true 27 + , withMccabe ? true 28 + , withPycodestyle ? true 29 + , withPydocstyle ? true 30 + , withPyflakes ? true 31 + , withPylint ? true 32 + , withRope ? true 33 + , withYapf ? true 25 34 }: 26 35 27 36 buildPythonPackage rec { ··· 37 46 }; 38 47 39 48 propagatedBuildInputs = [ 40 - autopep8 41 - flake8 42 49 jedi 43 - mccabe 44 50 pluggy 45 - pycodestyle 46 - pydocstyle 47 - pyflakes 48 - pylint 49 51 python-lsp-jsonrpc 50 - rope 51 52 setuptools 52 53 ujson 53 - yapf 54 - ]; 54 + ] ++ lib.optional withAutopep8 autopep8 55 + ++ lib.optional withFlake8 flake8 56 + ++ lib.optional withMccabe mccabe 57 + ++ lib.optional withPycodestyle pycodestyle 58 + ++ lib.optional withPydocstyle pydocstyle 59 + ++ lib.optional withPyflakes pyflakes 60 + ++ lib.optional withPylint pylint 61 + ++ lib.optional withRope rope 62 + ++ lib.optional withYapf yapf; 55 63 56 64 checkInputs = [ 57 65 flaky ··· 61 69 pyqt5 62 70 pytestCheckHook 63 71 ]; 72 + 73 + disabledTests = lib.optional (!withPycodestyle) "test_workspace_loads_pycodestyle_config"; 74 + 75 + disabledTestPaths = lib.optional (!withAutopep8) "test/plugins/test_autopep8_format.py" 76 + ++ lib.optional (!withRope) "test/plugins/test_completion.py" 77 + ++ lib.optional (!withFlake8) "test/plugins/test_flake8_lint.py" 78 + ++ lib.optional (!withMccabe) "test/plugins/test_mccabe_lint.py" 79 + ++ lib.optional (!withPycodestyle) "test/plugins/test_pycodestyle_lint.py" 80 + ++ lib.optional (!withPydocstyle) "test/plugins/test_pydocstyle_lint.py" 81 + ++ lib.optional (!withPyflakes) "test/plugins/test_pyflakes_lint.py" 82 + ++ lib.optional (!withPylint) "test/plugins/test_pylint_lint.py" 83 + ++ lib.optional (!withRope) "test/plugins/test_rope_rename.py" 84 + ++ lib.optional (!withYapf) "test/plugins/test_yapf_format.py"; 64 85 65 86 postPatch = '' 66 87 substituteInPlace setup.cfg \