From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: Re: [PATCH] gnu: Add pyparsing. Date: Tue, 25 Nov 2014 18:17:24 +0100 Message-ID: <5474B9A4.1050809@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtJkI-00069F-5h for guix-devel@gnu.org; Tue, 25 Nov 2014 12:17:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtJjz-0005LZ-HB for guix-devel@gnu.org; Tue, 25 Nov 2014 12:17:46 -0500 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:59680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtJjz-0005LH-B0 for guix-devel@gnu.org; Tue, 25 Nov 2014 12:17:27 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so9849477wiv.6 for ; Tue, 25 Nov 2014 09:17:26 -0800 (PST) Received: from [192.168.0.10] (tal33-3-82-233-82-24.fbx.proxad.net. [82.233.82.24]) by mx.google.com with ESMTPSA id el6sm17272545wib.23.2014.11.25.09.17.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Nov 2014 09:17:25 -0800 (PST) In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org On 11/25/2014 05:55 PM, Federico Beffa wrote: > Please find attached a pyparsing package for review. > Review inlined. > Regards, > Fede > > > 0001-gnu-Add-pyparsing.patch > > > From edebe9d7663932912c6245abd690795fc02c1d02 Mon Sep 17 00:00:00 2001 > From: Federico Beffa > 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 | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm > index 7967201..d9715c0 100644 > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -1932,3 +1932,57 @@ 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")) Maybe you could add the PyPI mirror here. > + (sha256 > + (base32 > + "01lasib0n2fp2k99c988qhz16lm9hcwmnmrmhybdb3jq2xmkvr0p")))) > + (build-system python-build-system) > + (outputs '("out" "doc")) > + (arguments > + `(#:tests? #f ; no test target There is a "unitTests.py" that can be run manually, if I'm not mistaken. Maybe you could replace the check phase ? > + #: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) > + (with-directory-excursion "docs" > + (map (lambda (file) > + (copy-file file (string-append doc "/" file))) > + (find-files "." ".*"))) > + (with-directory-excursion "htmldoc" > + (map (lambda (file) > + (copy-file file (string-append html-doc "/" file))) > + (find-files "." ".*"))) > + (with-directory-excursion "examples" > + (map (lambda (file) > + (copy-file file (string-append examples "/" file))) > + (find-files "." ".*"))))) > + %standard-phases))) I trust you on the doc thing :) Is it something that could somehow be part of the python build system? > + (home-page "http://pyparsing.wikispaces.com") > + (synopsis "A Python parsing module") Do not start the synopsis by "a". You may want to run "guix lint" on your package to find such issues. > + (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)) > + Thanks! Cyril.