From 0a79063bacd15b7b1668335a5a50fb7073b55c64 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 10 Nov 2021 16:49:35 +0200 Subject: [PATCH 1/2] python3.pkgs.docstring-to-markdown: init at 0.9 --- .../docstring-to-markdown/default.nix | 37 +++++++++++++++++++ .../remove-coverage-tests.patch | 16 ++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 55 insertions(+) create mode 100644 pkgs/development/python-modules/docstring-to-markdown/default.nix create mode 100644 pkgs/development/python-modules/docstring-to-markdown/remove-coverage-tests.patch diff --git a/pkgs/development/python-modules/docstring-to-markdown/default.nix b/pkgs/development/python-modules/docstring-to-markdown/default.nix new file mode 100644 index 000000000000..f4f2a36f5394 --- /dev/null +++ b/pkgs/development/python-modules/docstring-to-markdown/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/development/python-modules/docstring-to-markdown/remove-coverage-tests.patch b/pkgs/development/python-modules/docstring-to-markdown/remove-coverage-tests.patch new file mode 100644 index 000000000000..68bc626ced91 --- /dev/null +++ b/pkgs/development/python-modules/docstring-to-markdown/remove-coverage-tests.patch @@ -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] diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b6d07f926e1f..acf941a0756f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2267,6 +2267,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 { }; From c02d778b1c07c3ed944844bcbbd99cae45e9df65 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 10 Nov 2021 16:49:56 +0200 Subject: [PATCH 2/2] python3.pkgs.jedi-language-server: init at 0.34.8 --- .../jedi-language-server/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/jedi-language-server/default.nix diff --git a/pkgs/development/python-modules/jedi-language-server/default.nix b/pkgs/development/python-modules/jedi-language-server/default.nix new file mode 100644 index 000000000000..8aead2738f40 --- /dev/null +++ b/pkgs/development/python-modules/jedi-language-server/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index acf941a0756f..d75067d3c13b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3931,6 +3931,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 { };