guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: Add python-bashlex.


From: guix-commits
Subject: 01/02: gnu: Add python-bashlex.
Date: Thu, 28 May 2020 20:31:28 -0400 (EDT)

lfam pushed a commit to branch master
in repository guix.

commit 29ac40e9befb3fb9425e2d457fc52f0898ab24a7
Author: Yuval Kogman <nothingmuch@woobling.org>
AuthorDate: Thu May 28 20:27:30 2020 -0400

    gnu: Add python-bashlex.
    
    * gnu/packages/python-xyz.scm (python-bashlex): New variable.
    
    Signed-off-by: Leo Famulari <leo@famulari.name>
---
 gnu/packages/python-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b96a44e..4cbf20e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -79,6 +79,7 @@
 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
+;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20021,3 +20022,39 @@ allows you, from Python code, to “fix” invalid (X)HTML 
markup.")
     (description "This packages selects the fastest JSON functions available
 at import time.")
     (license license:expat)))
+
+(define-public python-bashlex
+  (package
+    (name "python-bashlex")
+    (version "0.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "bashlex" version))
+       (sha256
+        (base32
+         "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'pregenerate-yacc-tables
+           (lambda _
+             ;; parser.py caches tables, which attempts to write to site lib
+             ;; see https://github.com/idank/bashlex/issues/51
+             (invoke "python" "-c" "import bashlex"))))))
+    (home-page
+     "https://github.com/idank/bashlex";)
+    (synopsis "Python parser for bash")
+    (description "@code{bashlex} is a Python port of the parser used
+internally by GNU bash.
+
+For the most part it's transliterated from C, the major differences are:
+
+@itemize
+@item it does not execute anything
+@item it is reentrant
+@item it generates a complete AST
+@end itemize
+")
+    (license license:gpl3+)))



reply via email to

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