Merge pull request #44567 from LnL7/python-language-server
python-language-server: 0.18.0 -> 0.19.0
This commit is contained in:
commit
9d825127b5
@ -1,45 +1,60 @@
|
|||||||
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
|
{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
|
||||||
, configparser, futures, future, jedi, pluggy
|
, configparser, futures, future, jedi, pluggy
|
||||||
, pytest, mock, pytestcov, coverage
|
, pytest, mock, pytestcov, coverage
|
||||||
|
, # Allow building a limited set of providers, e.g. ["pycodestyle"].
|
||||||
|
providers ? ["*"]
|
||||||
# The following packages are optional and
|
# The following packages are optional and
|
||||||
# can be overwritten with null as your liking.
|
# can be overwritten with null as your liking.
|
||||||
# This also requires to disable tests.
|
|
||||||
, rope ? null
|
|
||||||
, mccabe ? null
|
|
||||||
, pyflakes ? null
|
|
||||||
, pycodestyle ? null
|
|
||||||
, autopep8 ? null
|
, autopep8 ? null
|
||||||
, yapf ? null
|
, mccabe ? null
|
||||||
|
, pycodestyle ? null
|
||||||
, pydocstyle ? null
|
, pydocstyle ? null
|
||||||
|
, pyflakes ? null
|
||||||
|
, rope ? null
|
||||||
|
, yapf ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
withProvider = p: builtins.elem "*" providers || builtins.elem p providers;
|
||||||
|
in
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-language-server";
|
pname = "python-language-server";
|
||||||
version = "0.18.0";
|
version = "0.19.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "palantir";
|
owner = "palantir";
|
||||||
repo = "python-language-server";
|
repo = "python-language-server";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0ig34bc0qm6gdj8xakmm3877lmf8ms7qg0xj8hay9gpgf8cz894s";
|
sha256 = "0glnhnjmsnnh1vs73n9dglknfkhcgp03nkjbpz0phh1jlqrkrwm6";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# The tests require all the providers, disable otherwise.
|
||||||
|
doCheck = providers == ["*"];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest mock pytestcov coverage
|
pytest mock pytestcov coverage
|
||||||
# rope is technically a dependency, but we don't add it by default since we
|
# rope is technically a dependency, but we don't add it by default since we
|
||||||
# already have jedi, which is the preferred option
|
# already have jedi, which is the preferred option
|
||||||
rope
|
rope
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
HOME=$TEMPDIR pytest
|
HOME=$TEMPDIR pytest
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [ jedi pluggy future ]
|
||||||
jedi pluggy mccabe pyflakes pycodestyle yapf pydocstyle future autopep8
|
++ stdenv.lib.optional (withProvider "autopep8") autopep8
|
||||||
] ++ lib.optional (isPy27) [ configparser ]
|
++ stdenv.lib.optional (withProvider "mccabe") mccabe
|
||||||
++ lib.optional (pythonOlder "3.2") [ futures ];
|
++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle
|
||||||
|
++ stdenv.lib.optional (withProvider "pydocstyle") pydocstyle
|
||||||
|
++ stdenv.lib.optional (withProvider "pyflakes") pyflakes
|
||||||
|
++ stdenv.lib.optional (withProvider "rope") rope
|
||||||
|
++ stdenv.lib.optional (withProvider "yapf") yapf
|
||||||
|
++ stdenv.lib.optional isPy27 configparser
|
||||||
|
++ stdenv.lib.optional (pythonOlder "3.2") futures;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://github.com/palantir/python-language-server;
|
homepage = https://github.com/palantir/python-language-server;
|
||||||
description = "An implementation of the Language Server Protocol for Python";
|
description = "An implementation of the Language Server Protocol for Python";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user