aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorFederico Beffa <beffa@fbengineering.ch>2014-11-25 16:27:33 +0100
committerFederico Beffa <beffa@fbengineering.ch>2014-11-25 22:04:38 +0100
commit15bfe6d63561bf9fbcaf9763a8cbc102dba242f1 (patch)
treeea385b44f9710e0d8bdc3d4594174d9d79a53b47 /gnu/packages
parenta82bec4e89f1b4282c2251bc93d4af5625090959 (diff)
downloadpatches-15bfe6d63561bf9fbcaf9763a8cbc102dba242f1.tar
patches-15bfe6d63561bf9fbcaf9763a8cbc102dba242f1.tar.gz
gnu: Add pyparsing.
* gnu/packages/python.scm (python-pyparsing, python2-pyparsing): New variables.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 7967201f17..c0eea3c631 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1932,3 +1932,52 @@ capabilities.")
(define python2-numpy-bootstrap
(package-with-python2 python-numpy-bootstrap))
+
+(define-public python-pyparsing
+ (package
+ (name "python-pyparsing")
+ (version "2.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/pyparsing"
+ "/pyparsing-" version ".tar.gz"))
+ (sha256
+ (base32
+ "01lasib0n2fp2k99c988qhz16lm9hcwmnmrmhybdb3jq2xmkvr0p"))))
+ (build-system python-build-system)
+ (outputs '("out" "doc"))
+ (arguments
+ `(#:tests? #f ; no test target
+ #:modules ((guix build python-build-system)
+ (guix build utils))
+ #:phases
+ (alist-cons-after
+ 'install 'install-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((doc (string-append (assoc-ref outputs "doc")
+ "/share/doc/" ,name "-" ,version))
+ (html-doc (string-append doc "/html"))
+ (examples (string-append doc "/examples")))
+ (mkdir-p html-doc)
+ (mkdir-p examples)
+ (for-each
+ (lambda (dir tgt)
+ (map (lambda (file)
+ (copy-file file (string-append tgt "/" (basename file))))
+ (find-files dir ".*")))
+ (list "docs" "htmldoc" "examples")
+ (list doc html-doc examples))))
+ %standard-phases)))
+ (home-page "http://pyparsing.wikispaces.com")
+ (synopsis "Python parsing class library")
+ (description
+ "The pyparsing module is an alternative approach to creating and
+executing simple grammars, vs. the traditional lex/yacc approach, or the use
+of regular expressions. The pyparsing module provides a library of classes
+that client code uses to construct the grammar directly in Python code.")
+ (license expat)))
+
+(define-public python2-pyparsing
+ (package-with-python2 python-pyparsing))
+