guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#48842] [PATCH v2 7/7] gnu: Add python-myst-parser.


From: Vinicius Monego
Subject: [bug#48842] [PATCH v2 7/7] gnu: Add python-myst-parser.
Date: Mon, 7 Jun 2021 11:20:51 +0000

* gnu/packages/sphinx.scm (python-myst-parser): New variable.
---
Changed synopsis and description, and clarified the comment about why tests are 
skipped.

 gnu/packages/sphinx.scm | 55 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 428a701d87..eefba27f00 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -45,6 +45,7 @@
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages python-build)
+  #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
@@ -616,6 +617,60 @@ and several other projects.")
 (define-public python2-sphinx-rtd-theme
   (package-with-python2 python-sphinx-rtd-theme))
 
+(define-public python-myst-parser
+  (package
+    (name "python-myst-parser")
+    (version "0.14.0")
+    (source
+     (origin
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/executablebooks/myst-parser";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0s5lmhj1rb94na646klivzvzzhzpy03m5q9ixif9vg14yin3gm7s"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest"
+                       ;; Tests in this file fail with AssertionErrors related
+                       ;; to adding divs to the HTML tags:
+                       ;; E -   <section id="test">
+                       ;; E +   <div class="section" id="test">
+                       "--ignore" "tests/test_sphinx/test_sphinx_builds.py"
+                       ;; Another AssertionError:
+                       ;; E -     <hlist>
+                       ;; E +     <hlist ncolumns="2">
+                       "-k" "not test_sphinx_directives")))))))
+    (propagated-inputs
+     `(("python-docutils" ,python-docutils)
+       ("python-jinja2" ,python-jinja2)
+       ("python-markdown-it-py" ,python-markdown-it-py)
+       ("python-mdit-py-plugins"
+        ,python-mdit-py-plugins)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-sphinx" ,python-sphinx)))
+    (native-inputs
+     `(("python-beautifulsoup4" ,python-beautifulsoup4)
+       ("python-coverage" ,python-coverage)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-pytest-regressions"
+        ,python-pytest-regressions)))
+    (home-page "https://github.com/executablebooks/MyST-Parser";)
+    (synopsis "Extended CommonMark-compliant parser")
+    (description
+     "MyST-parser is an extended CommonMark-compliant parser, with bridges to
+docutils and Sphinx.")
+    (license license:expat)))
+
 (define-public python-breathe
   (package
     (name "python-breathe")
-- 
2.31.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]