1 { lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
2 , backports_functools_lru_cache, configparser, futures, future, jedi, pluggy, python-jsonrpc-server, flake8
3 , pytestCheckHook, mock, pytestcov, coverage, setuptools, ujson, flaky
4 , # Allow building a limited set of providers, e.g. ["pycodestyle"].
6 # The following packages are optional and
7 # can be overwritten with null as your liking.
19 withProvider = p: builtins.elem "*" providers || builtins.elem p providers;
22 buildPythonPackage rec {
23 pname = "python-language-server";
26 src = fetchFromGitHub {
28 repo = "python-language-server";
30 sha256 = "07x6jr4z20jxn03bxblwc8vk0ywha492cgwfhj7q97nb5cm7kx0q";
33 propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server ujson ]
34 ++ lib.optional (withProvider "autopep8") autopep8
35 ++ lib.optional (withProvider "mccabe") mccabe
36 ++ lib.optional (withProvider "pycodestyle") pycodestyle
37 ++ lib.optional (withProvider "pydocstyle") pydocstyle
38 ++ lib.optional (withProvider "pyflakes") pyflakes
39 ++ lib.optional (withProvider "pylint") pylint
40 ++ lib.optional (withProvider "rope") rope
41 ++ lib.optional (withProvider "yapf") yapf
42 ++ lib.optional isPy27 configparser
43 ++ lib.optionals (pythonOlder "3.2") [ backports_functools_lru_cache futures ];
45 # The tests require all the providers, disable otherwise.
46 doCheck = providers == ["*"];
49 pytestCheckHook mock pytestcov coverage flaky
50 # Do not propagate flake8 or it will enable pyflakes implicitly
52 # rope is technically a dependency, but we don't add it by default since we
53 # already have jedi, which is the preferred option
57 dontUseSetuptoolsCheck = true;
63 # Tests failed since update to 0.31.8
65 "test_pyqt_completion"
66 "test_numpy_completions"
67 "test_pandas_completions"
68 "test_matplotlib_completions"
69 "test_snippet_parsing"
72 ] ++ lib.optional isPy27 "test_flake8_lint";
75 homepage = "https://github.com/palantir/python-language-server";
76 description = "An implementation of the Language Server Protocol for Python";
77 license = licenses.mit;
78 maintainers = [ maintainers.mic92 ];