Merge pull request #90616 from Mic92/pyls-fixes
python-language-server: 3.8 fixes + deps
This commit is contained in:
commit
5d6f47c223
5 changed files with 49 additions and 17 deletions
|
@ -27,6 +27,9 @@ buildPythonPackage rec {
|
|||
homepage = "https://github.com/rupert/pyls-black";
|
||||
description = "Black plugin for the Python Language Server";
|
||||
license = licenses.mit;
|
||||
# Not compatible with 0.33.1
|
||||
# https://github.com/rupert/pyls-black/issues/24
|
||||
broken = true; # since 2020-06-16
|
||||
maintainers = [ maintainers.mic92 ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,29 +1,45 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, isPy27
|
||||
, future, python-language-server, mypy, configparser
|
||||
, pytest, mock, isPy3k, pytestcov, coverage
|
||||
, pytestCheckHook, mock, isPy3k, pytestcov, coverage
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyls-mypy";
|
||||
version = "0.1.6";
|
||||
version = "0.1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tomv564";
|
||||
repo = "pyls-mypy";
|
||||
rev = version;
|
||||
sha256 = "0c1111m9h6f05frkyj6i757q9y2lijpbv8nxmwgp3nqbpkvfnmrk";
|
||||
sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb";
|
||||
};
|
||||
|
||||
disabled = !isPy3k;
|
||||
# presumably tests don't find typehints ?
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
HOME=$TEMPDIR pytest
|
||||
disabledTests = [
|
||||
"test_parse_line_without_line"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$TEMPDIR
|
||||
'';
|
||||
|
||||
checkInputs = [ pytest mock pytestcov coverage ];
|
||||
patches = [
|
||||
# makes future optional
|
||||
(fetchpatch {
|
||||
url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch";
|
||||
sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5";
|
||||
})
|
||||
];
|
||||
|
||||
checkInputs = [ mock pytestcov coverage pytestCheckHook ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
mypy python-language-server future configparser
|
||||
mypy python-language-server configparser
|
||||
] ++ lib.optional (isPy27) [
|
||||
future
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder
|
||||
, pytest, mock, pytestcov, coverage
|
||||
, future, futures, ujson, isPy38
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -16,6 +17,8 @@ buildPythonPackage rec {
|
|||
|
||||
postPatch = ''
|
||||
sed -i 's/version=versioneer.get_version(),/version="${version}",/g' setup.py
|
||||
# https://github.com/palantir/python-jsonrpc-server/issues/36
|
||||
sed -i -e 's!ujson<=!ujson>=!' setup.py
|
||||
'';
|
||||
|
||||
checkInputs = [
|
||||
|
@ -26,7 +29,16 @@ buildPythonPackage rec {
|
|||
pytest
|
||||
'';
|
||||
|
||||
disabled = isPy38;
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/palantir/python-jsonrpc-server/commit/0a04cc4e9d44233b1038b12d63cd3bd437c2374e.patch";
|
||||
sha256 = "177zdnp1808r2pg189bvzab44l8i2alsgv04kmrlhhnv40h66qyg";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/palantir/python-jsonrpc-server/commit/5af6e43d0c1fb9a6a29b96d38cfd6dbeec85d0ea.patch";
|
||||
sha256 = "1gx7lc1jxar1ngqqfkdn21s46y1mfnjf7ky2886ydk53nkaba91m";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ future ujson ]
|
||||
++ stdenv.lib.optional (pythonOlder "3.2") futures;
|
||||
|
|
|
@ -21,15 +21,20 @@ in
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-language-server";
|
||||
version = "0.31.9";
|
||||
version = "0.33.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "palantir";
|
||||
repo = "python-language-server";
|
||||
rev = version;
|
||||
sha256 = "06hd6a1hhd57hrq4vbwfs0saplkhsrz2krv8kq9kw4fz4hx7zj74";
|
||||
sha256 = "064ck4ikrrrhq8wjpbs5k6hzkrjvfg91pd6351471xpsij0kj16f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# https://github.com/palantir/python-jsonrpc-server/issues/36
|
||||
sed -i -e 's!ujson<=!ujson>=!' setup.py
|
||||
'';
|
||||
|
||||
# The tests require all the providers, disable otherwise.
|
||||
doCheck = providers == ["*"];
|
||||
|
||||
|
@ -53,10 +58,8 @@ buildPythonPackage rec {
|
|||
"test_pandas_completions"
|
||||
"test_matplotlib_completions"
|
||||
"test_snippet_parsing"
|
||||
"test_numpy_hover"
|
||||
] ++ stdenv.lib.optional isPy27 "test_flake8_lint";
|
||||
# checkPhase = ''
|
||||
# HOME=$TEMPDIR pytest -k "not test_pyqt_completion and not
|
||||
# '';
|
||||
|
||||
propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server flake8 ujson ]
|
||||
++ stdenv.lib.optional (withProvider "autopep8") autopep8
|
||||
|
|
|
@ -4,8 +4,6 @@ buildPythonPackage rec {
|
|||
pname = "rope";
|
||||
version = "0.17.0";
|
||||
|
||||
disabled = pythonAtLeast "3.8"; # 0.17 should support Python 3.8
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "658ad6705f43dcf3d6df379da9486529cf30e02d9ea14c5682aa80eb33b649e1";
|
||||
|
|
Loading…
Reference in a new issue