diff mbox series

[bug#50021,v2,5/8] gnu: Add python-fluent-syntax.

Message ID 20211025231615.73660-5-monego@posteo.net
State Accepted
Headers show
Series [bug#50021,v2,1/8] gnu: Add python-phply. | expand

Commit Message

Vinicius Monego Oct. 25, 2021, 11:16 p.m. UTC
* gnu/packages/python-xyz.scm (python-fluent-syntax): New variable.
---
 gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1501fdac39..068278c2f8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13530,6 +13530,39 @@  interface to the Amazon Web Services (AWS) API.")
 @acronym{AWS,Amazon Web Services}.")
     (license license:asl2.0)))
 
+(define-public python-fluent-syntax
+  (package
+    (name "python-fluent-syntax")
+    (version "0.18.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference ; no tests in PyPI release
+             (url "https://github.com/projectfluent/python-fluent")
+             (commit (string-append "fluent.syntax@" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "06a88fyhqvmhpp1wf7ghcmpzg92s8wgpb1bbi4y09ixva5r9dgwg"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'goto-syntax-dir
+           (lambda _
+             (chdir "fluent.syntax")))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "runtests.py")))))))
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (home-page "https://github.com/projectfluent/python-fluent")
+    (synopsis "Localization library for expressive translations")
+    (description "This package includes the parser, serializer, and traversal
+utilities like Visitor and Transformer for Fluent files.")
+    (license license:asl2.0)))
+
 (define-public python-pyfiglet
   (package
     (name "python-pyfiglet")