22 lib ,
33 buildPythonPackage ,
44 fetchFromGitHub ,
5- pythonAtLeast ,
6- pythonOlder ,
75
86 # build-system
97 setuptools-scm ,
1513 python-lsp-jsonrpc ,
1614 setuptools ,
1715 ujson ,
18- importlib-metadata ,
1916
2017 # optional-dependencies
2118 autopep8 ,
3027 whatthepatch ,
3128 yapf ,
3229
33- # checks
30+ # tests
3431 flaky ,
3532 matplotlib ,
3633 numpy ,
3734 pandas ,
3835 pytest-cov-stub ,
3936 pytestCheckHook ,
4037 websockets ,
41-
42- testers ,
43- python-lsp-server ,
38+ versionCheckHook ,
39+ writableTmpDirAsHomeHook ,
4440} :
4541
4642buildPythonPackage rec {
4743 pname = "python-lsp-server" ;
48- version = "1.12.0 " ;
44+ version = "1.12.1 " ;
4945 pyproject = true ;
5046
51- disabled = pythonOlder "3.8" ;
52-
5347 src = fetchFromGitHub {
5448 owner = "python-lsp" ;
5549 repo = "python-lsp-server" ;
5650 tag = "v${ version } " ;
57- hash = "sha256-oFqa7DtFpJmDZrw+GJqrFH3QqnMAu9159q3IWT9vRko =" ;
51+ hash = "sha256-1jWui48QmnTw18Dvl24lgxsUkm0/mxyjIZP6+ScjGY4 =" ;
5852 } ;
5953
6054 pythonRelaxDeps = [
@@ -75,7 +69,7 @@ buildPythonPackage rec {
7569 python-lsp-jsonrpc
7670 setuptools # `pkg_resources`imported in pylsp/config/config.py
7771 ujson
78- ] ++ lib . optionals ( pythonOlder "3.10" ) [ importlib-metadata ] ;
72+ ] ;
7973
8074 optional-dependencies = {
8175 all = [
@@ -113,42 +107,22 @@ buildPythonPackage rec {
113107 pandas
114108 pytest-cov-stub
115109 pytestCheckHook
110+ versionCheckHook
111+ writableTmpDirAsHomeHook
116112 ] ++ optional-dependencies . all ;
113+ versionCheckProgram = "${ placeholder "out" } /bin/pylsp" ;
114+ versionCheckProgramArg = [ "--version" ] ;
117115
118116 disabledTests = [
119- # Don't run lint tests
120- "test_pydocstyle"
121- # https://github.com/python-lsp/python-lsp-server/issues/243
122- # "test_numpy_completions"
123- "test_workspace_loads_pycodestyle_config"
124- "test_autoimport_code_actions_and_completions_for_notebook_document"
125117 # avoid dependencies on many Qt things just to run one singular test
126118 "test_pyqt_completion"
127- # https://github.com/python-lsp/python-lsp-server/issues/602
128- "test_jedi_completion_with_fuzzy_enabled"
129119 ] ;
130120
131- preCheck =
132- ''
133- export HOME=$(mktemp -d);
134- ''
135- # https://github.com/python-lsp/python-lsp-server/issues/605
136- + lib . optionalString ( pythonAtLeast "3.13" ) ''
137- substituteInPlace test/conftest.py --replace-fail logging.DEBUG logging.INFO
138- '' ;
139-
140121 pythonImportsCheck = [
141122 "pylsp"
142123 "pylsp.python_lsp"
143124 ] ;
144125
145- passthru = {
146- tests . version = testers . testVersion {
147- package = python-lsp-server ;
148- version = "v${ version } " ;
149- } ;
150- } ;
151-
152126 meta = {
153127 description = "Python implementation of the Language Server Protocol" ;
154128 homepage = "https://github.com/python-lsp/python-lsp-server" ;
0 commit comments