diff mbox series

[bug#48842,3/6] gnu: Add python-linkify-it-py.

Message ID 20210605014655.18459-3-monego@posteo.net
State New
Headers show
Series gnu: Add python-myst-parser. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego June 5, 2021, 1:46 a.m. UTC
* gnu/packages/python-xyz.scm (python-linkify-it-py, python-uc-micro-py): New variables.
---
 gnu/packages/python-xyz.scm | 72 +++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

Comments

Xinglu Chen June 5, 2021, 1:27 p.m. UTC | #1
On Sat, Jun 05 2021, Vinicius Monego wrote:

> * gnu/packages/python-xyz.scm (python-linkify-it-py, python-uc-micro-py): New variables.

This should be split into two separate patches.  Also, since these two
packages seem closely related, it might be a good idea to put a comment
saying that both should be updated at the same time.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d978942402..89717975ee 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7027,6 +7027,78 @@  cluster without needing to write any wrapper code yourself.")
 (define-public python2-gridmap
   (package-with-python2 python-gridmap))
 
+(define python-uc-micro-py
+  (package
+    (name "python-uc-micro-py")
+    (version "1.0.1")
+    (source
+     (origin
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tsutsu3/uc.micro-py")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "17f55gi55rg47nm88fn3f8851ph03dgykdp011lxr3j6hk18lyfv"))))
+    (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")))))))
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)))
+    (home-page "https://github.com/tsutsu3/uc.micro-py")
+    (synopsis "Micro subset of unicode data files for linkify-it-py projects")
+    (description
+     "This is a Python port of @code{uc.micro}.  This package content is only
+for the @code{linkify-it-py} project needs.")
+    (license license:expat)))
+
+(define-public python-linkify-it-py
+  (package
+    (name "python-linkify-it-py")
+    (version (package-version python-uc-micro-py))
+    (source
+     (origin
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tsutsu3/linkify-it-py")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00r4sxgvlxkm5k2jwvrsxgzcccfkfzd0knypbcig5almisg7bpl1"))))
+    (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")))))))
+    (propagated-inputs
+     `(("python-uc-micro-py" ,python-uc-micro-py)))
+    (native-inputs
+     `(("python-black" ,python-black)
+       ("python-coverage" ,python-coverage)
+       ("python-flake8" ,python-flake8)
+       ("python-isort" ,python-isort)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)))
+    (home-page "https://github.com/tsutsu3/linkify-it-py")
+    (synopsis "Links recognition library with full unicode support")
+    (description
+     "This is a Python port of @code{linkify-it}.")
+    (license license:expat)))
+
 (define-public python-honcho
   (package
     (name "python-honcho")