11 docstring-to-markdown,
19 # optional-dependencies
44 buildPythonPackage rec {
45 pname = "python-lsp-server";
49 disabled = pythonOlder "3.8";
51 src = fetchFromGitHub {
53 repo = "python-lsp-server";
54 rev = "refs/tags/v${version}";
55 hash = "sha256-oFqa7DtFpJmDZrw+GJqrFH3QqnMAu9159q3IWT9vRko=";
59 substituteInPlace pyproject.toml \
60 --replace-fail "--cov-report html --cov-report term --junitxml=pytest.xml" "" \
61 --replace-fail "--cov pylsp --cov test" ""
73 build-system = [ setuptools-scm ];
80 setuptools # `pkg_resources`imported in pylsp/config/config.py
82 ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
84 optional-dependencies = {
98 autopep8 = [ autopep8 ];
101 pycodestyle = [ pycodestyle ];
102 pydocstyle = [ pydocstyle ];
103 pyflakes = [ pyflakes ];
110 websockets = [ websockets ];
113 nativeCheckInputs = [
119 ] ++ optional-dependencies.all;
122 # Don't run lint tests
124 # https://github.com/python-lsp/python-lsp-server/issues/243
125 # "test_numpy_completions"
126 "test_workspace_loads_pycodestyle_config"
127 "test_autoimport_code_actions_and_completions_for_notebook_document"
128 # avoid dependencies on many Qt things just to run one singular test
129 "test_pyqt_completion"
133 export HOME=$(mktemp -d);
136 pythonImportsCheck = [
142 tests.version = testers.testVersion {
143 package = python-lsp-server;
144 version = "v${version}";
149 description = "Python implementation of the Language Server Protocol";
150 homepage = "https://github.com/python-lsp/python-lsp-server";
151 changelog = "https://github.com/python-lsp/python-lsp-server/blob/v${version}/CHANGELOG.md";
152 license = lib.licenses.mit;
153 maintainers = with lib.maintainers; [ fab ];
154 mainProgram = "pylsp";