diff mbox series

[bug#49123,21/24] gnu: Add python-baron.

Message ID 20210620010742.4259-21-0x2d@disroot.org
State New
Headers show
Series [bug#49123,01/24] gnu: Add pyotherside. | expand

Checks

Context Check Description
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

slg June 20, 2021, 1:07 a.m. UTC
* gnu/packages/python-xyz.scm (python-baron): New variable.
---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6db019082d..6096ba29d1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26083,3 +26083,35 @@  is a Python port from filetype Go package.")
     (description "Plyer is a platform-independent api to use features
 commonly found on various platforms, notably mobile ones, in Python.")
     (license license:x11)))
+
+(define-public python-baron
+  (package
+    (name "python-baron")
+    (version "0.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "baron" version))
+       (sha256
+        (base32
+         "0fib74nkqnl1i2zzlhbbfpw3whwc4951p9x61r2xrxhwp4r9yn5h"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-rply" ,python-rply)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "pytest" "-vv" "tests/")
+             #t)))))
+    (home-page "https://github.com/PyCQA/baron")
+    (synopsis "Full Syntax Tree (FST) Python library")
+    (description "Baron is a Full Syntax Tree (FST) library for Python.
+By opposition to an AST which drops some syntax information in the
+process of its creation (like empty lines, comments, formatting), a FST
+keeps everything and guarantees the operation
+@code{fst_to_code(code_to_fst(source_code)) == source_code}.")
+    (license license:lgpl3)))