diff mbox series

[bug#47548,1/2] gnu: Add python-smartypants.

Message ID OSZP286MB06649E3E15437A505F2DDDA5A37B9@OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM
State Accepted
Headers show
Series [bug#47548,1/2] gnu: Add python-smartypants. | expand

Checks

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

Commit Message

宋文武 April 1, 2021, 2:50 p.m. UTC
From: 宋文武 <iyzsong@member.fsf.org>

* gnu/packages/python-xyz.scm (python-smartypants): New variable.
---
 gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Comments

Leo Famulari April 1, 2021, 8:19 p.m. UTC | #1
On Thu, Apr 01, 2021 at 10:50:47PM +0800, iyzsong@outlook.com wrote:
> From: 宋文武 <iyzsong@member.fsf.org>
> 
> * gnu/packages/python-xyz.scm (python-smartypants): New variable.

LGTM, thanks!
宋文武 April 2, 2021, 10:39 a.m. UTC | #2
Leo Famulari <leo@famulari.name> writes:

> On Thu, Apr 01, 2021 at 10:50:47PM +0800, iyzsong@outlook.com wrote:
>> From: 宋文武 <iyzsong@member.fsf.org>
>> 
>> * gnu/packages/python-xyz.scm (python-smartypants): New variable.
>
> LGTM, thanks!

Pushed!
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index dac857a83d..dfce35a212 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24331,3 +24331,44 @@  number of words, syllables, and sentences.")
      "This package provides a Python library that can parse OPML, FOAF, and
 iGoogle subscription lists.")
     (license license:expat)))
+
+(define-public python-smartypants
+  (package
+    (name "python-smartypants")
+    (version "2.0.1")
+    (source
+     (origin
+       ;; There's no source tarball for 2.0.1 on PyPI.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/leohemsted/smartypants.py")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           ;; Its `setup.py test` doesn't report failure with exit status, so
+           ;; we use `nose` instead.
+           (lambda _
+             (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
+    (native-inputs
+     ;; For tests.
+     `(("python-docutils" ,python-docutils)
+       ("python-nose" ,python-nose)
+       ("python-pygments" ,python-pygments)))
+    (home-page "https://github.com/leohemsted/smartypants.py")
+    (synopsis "Translate punctuation characters into smart quotes")
+    (description
+     "@command{smartpants} can perform the following transformations:
+@enumerate
+@item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
+@item Backticks-style quotes (``like this'') into \"curly\" quote HTML
+entities
+@item Dashes (-- and ---) into en- and em-dash entities
+@item Three consecutive dots (... or . . .) into an ellipsis entity
+@end enumerate")
+    (license license:bsd-3)))