Skip to content

Commit

Permalink
Merge pull request #145372 from doronbehar/pkg/jedi-lanugage-server
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Nov 13, 2021
2 parents 88c5c91 + c02d778 commit 337423b
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pkgs/development/python-modules/docstring-to-markdown/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "docstring-to-markdown";
version = "0.9";

src = fetchFromGitHub {
owner = "python-lsp";
repo = pname;
rev = "v${version}";
sha256 = "sha256-XVTlSqqWmvnB5nvjvgGDJmg71KKTq2hHB4//QW7ugvA=";
};

patches = [
# So pytest-flake8 and pytest-cov won't be needed
./remove-coverage-tests.patch
];

checkInputs = [
pytestCheckHook
];

pythonImportsCheck = [
"docstring_to_markdown"
];

meta = with lib; {
homepage = "https://github.com/python-lsp/docstring-to-markdown";
description = "On the fly conversion of Python docstrings to markdown";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ doronbehar ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git i/setup.cfg w/setup.cfg
index e880e74..e77133e 100644
--- i/setup.cfg
+++ w/setup.cfg
@@ -34,11 +34,7 @@ docstring-to-markdown = py.typed
[tool:pytest]
addopts =
--pyargs tests
- --cov docstring_to_markdown
- --cov-fail-under=98
- --cov-report term-missing:skip-covered
-p no:warnings
- --flake8
-vv

[flake8]
56 changes: 56 additions & 0 deletions pkgs/development/python-modules/jedi-language-server/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, poetry
, docstring-to-markdown
, jedi
, pygls
, pytestCheckHook
, pyhamcrest
, python-jsonrpc-server
}:

buildPythonPackage rec {
pname = "jedi-language-server";
version = "0.34.8";
format = "pyproject";

src = fetchFromGitHub {
owner = "pappasam";
repo = pname;
rev = "v${version}";
sha256 = "sha256-mJGgDDjPZXde4M4OHwj81KYoaFXFAwOZ+v18YE+arFE=";
};

nativeBuildInputs = [
poetry
];

propagatedBuildInputs = [
docstring-to-markdown
jedi
pygls
];

checkInputs = [
pytestCheckHook
pyhamcrest
python-jsonrpc-server
];

preCheck = ''
HOME="$(mktemp -d)"
'';

pythonImportsCheck = [
"jedi_language_server"
];

meta = with lib; {
homepage = "https://github.com/pappasam/jedi-language-server";
description = "A Language Server for the latest version(s) of Jedi";
license = licenses.mit;
maintainers = with maintainers; [ doronbehar ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,8 @@ in {

docloud = callPackage ../development/python-modules/docloud { };

docstring-to-markdown = callPackage ../development/python-modules/docstring-to-markdown { };

docopt = callPackage ../development/python-modules/docopt { };

docopt-ng = callPackage ../development/python-modules/docopt-ng { };
Expand Down Expand Up @@ -3933,6 +3935,8 @@ in {

jedi = callPackage ../development/python-modules/jedi { };

jedi-language-server = callPackage ../development/python-modules/jedi-language-server { };

jeepney = callPackage ../development/python-modules/jeepney { };

jellyfin-apiclient-python = callPackage ../development/python-modules/jellyfin-apiclient-python { };
Expand Down

0 comments on commit 337423b

Please sign in to comment.