about summary refs log tree commit diff
path: root/pkgs/development/python-modules/docstring-to-markdown
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2021-11-10 16:49:35 +0200
committerDoron Behar <doron.behar@gmail.com>2021-11-11 17:03:50 +0200
commit0a79063bacd15b7b1668335a5a50fb7073b55c64 (patch)
tree6bb75735fbfe26aef4e51ee48d14d39033bdd273 /pkgs/development/python-modules/docstring-to-markdown
parentc935f5e0add2cf0ae650d072c8357533e21b0c35 (diff)
python3.pkgs.docstring-to-markdown: init at 0.9
Diffstat (limited to 'pkgs/development/python-modules/docstring-to-markdown')
-rw-r--r--pkgs/development/python-modules/docstring-to-markdown/default.nix37
-rw-r--r--pkgs/development/python-modules/docstring-to-markdown/remove-coverage-tests.patch16
2 files changed, 53 insertions, 0 deletions
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 0000000000000..f4f2a36f5394a
--- /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 0000000000000..68bc626ced915
--- /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]