all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: Eric Bavier <ericbavier@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: Add pyparsing.
Date: Tue, 25 Nov 2014 20:47:45 +0100	[thread overview]
Message-ID: <CAKrPhPO8w=6VA069v_AThYXESX4nAHP=UkFgiBRV_nUTEN0ihg@mail.gmail.com> (raw)
In-Reply-To: <87a93ftcv2.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

On Tue, Nov 25, 2014 at 6:21 PM, Eric Bavier <ericbavier@gmail.com> wrote:
>
> Perhaps:
>
> (for-each
>   (lambda (dir tgt)
>     (for-each (lambda (file)
>                 (copy-file file
>                            (string-append tgt "/" (basename file))))
>               (find-files dir ".*")))
>   (list "docs" "htmldoc" "examples")
>   (list doc html-doc exmples)
>
> Not tested of course ;)

Definitely less boilerplate :-)

Thanks,
Fede

[-- Attachment #2: 0001-gnu-Add-pyparsing.patch --]
[-- Type: text/x-patch, Size: 2589 bytes --]

From 10f16ec3d3cca44c89e33df81e050dff5ea8c7f1 Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Tue, 25 Nov 2014 16:27:33 +0100
Subject: [PATCH] gnu: Add pyparsing.

* gnu/packages/python.scm (python-pyparsing, python2-pyparsing): New
  variables.
---
 gnu/packages/python.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 7967201..c0eea3c 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))
+
-- 
1.8.4


      parent reply	other threads:[~2014-11-25 19:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 16:55 [PATCH] gnu: Add pyparsing Federico Beffa
2014-11-25 17:11 ` Ludovic Courtès
2014-11-25 17:17 ` Cyril Roelandt
2014-11-25 17:21 ` Eric Bavier
2014-11-25 17:51   ` Federico Beffa
2014-11-26 16:40     ` Cyril Roelandt
2014-11-25 19:47   ` Federico Beffa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKrPhPO8w=6VA069v_AThYXESX4nAHP=UkFgiBRV_nUTEN0ihg@mail.gmail.com' \
    --to=beffa@ieee.org \
    --cc=ericbavier@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.