unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/3] Add babel.
@ 2013-05-23  2:08 Cyril Roelandt
  2013-05-23  2:08 ` [PATCH 1/3] python-build-system: add a check phase Cyril Roelandt
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-23  2:08 UTC (permalink / raw)
  To: bug-guix

Hi!

This patch adds babel. The first patch fixes the "check" phase of the
Python build system, which should be "python setup.py test" instead of "make
check". The second patch adds pytz, and the third one adds babel.

WBR,
Cyril Roelandt.

---
Cyril Roelandt (3):
  python-build-system: add a check phase.
  gnu: Add pytz.
  gnu: Add Babel.

 Makefile.am                        |    2 ++
 gnu/packages/babel.scm             |   51 ++++++++++++++++++++++++++++++++++++
 gnu/packages/pytz.scm              |   43 ++++++++++++++++++++++++++++++
 guix/build/python-build-system.scm |   16 ++++++++---
 4 files changed, 109 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/babel.scm
 create mode 100644 gnu/packages/pytz.scm

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/3] python-build-system: add a check phase.
  2013-05-23  2:08 [PATCH 0/3] Add babel Cyril Roelandt
@ 2013-05-23  2:08 ` Cyril Roelandt
  2013-05-23 12:05   ` Ludovic Courtès
  2013-05-23  2:08 ` [PATCH 2/3] gnu: Add pytz Cyril Roelandt
  2013-05-23  2:08 ` [PATCH 3/3] gnu: Add Babel Cyril Roelandt
  2 siblings, 1 reply; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-23  2:08 UTC (permalink / raw)
  To: bug-guix

* guix/build/python-build-system.scm: new function.
---
 guix/build/python-build-system.scm |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index b892c87..8429979 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -45,6 +45,14 @@
           (zero? (apply system* "python" args)))
         (error "no setup.py found"))))
 
+(define* (check #:key outputs #:allow-other-keys)
+  "Run the test suite of a given Python package."
+  (if (file-exists? "setup.py")
+      (let ((args `("setup.py" "check")))
+        (format #t "running 'python' with arguments ~s~%" args)
+        (zero? (apply system* "python" args)))
+      (error "no setup.py found")))
+
 (define* (wrap #:key outputs python-version #:allow-other-keys)
   (define (list-of-files dir)
     (map (cut string-append dir "/" <>)
@@ -78,10 +86,12 @@
   (alist-cons-after
    'install 'wrap
    wrap
-   (alist-replace 'install install
-                  (alist-delete 'configure
+   (alist-replace
+    'check check
+    (alist-replace 'install install
+                   (alist-delete 'configure
                                 (alist-delete 'build
-                                              gnu:%standard-phases)))))
+                                              gnu:%standard-phases))))))
 
 (define* (python-build #:key inputs (phases %standard-phases)
                        #:allow-other-keys #:rest args)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/3] gnu: Add pytz.
  2013-05-23  2:08 [PATCH 0/3] Add babel Cyril Roelandt
  2013-05-23  2:08 ` [PATCH 1/3] python-build-system: add a check phase Cyril Roelandt
@ 2013-05-23  2:08 ` Cyril Roelandt
  2013-05-23 12:07   ` Ludovic Courtès
  2013-05-23 12:08   ` Ludovic Courtès
  2013-05-23  2:08 ` [PATCH 3/3] gnu: Add Babel Cyril Roelandt
  2 siblings, 2 replies; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-23  2:08 UTC (permalink / raw)
  To: bug-guix

* gnu/packages/pytz.scm: New file.
* Makefile.am (MODULES): Add it.
---
 Makefile.am           |    1 +
 gnu/packages/pytz.scm |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 gnu/packages/pytz.scm

diff --git a/Makefile.am b/Makefile.am
index e6c21f9..0a08edb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -171,6 +171,7 @@ MODULES =					\
   gnu/packages/popt.scm				\
   gnu/packages/pth.scm				\
   gnu/packages/python.scm			\
+  gnu/packages/pytz.scm				\
   gnu/packages/qemu.scm				\
   gnu/packages/ratpoison.scm			\
   gnu/packages/readline.scm			\
diff --git a/gnu/packages/pytz.scm b/gnu/packages/pytz.scm
new file mode 100644
index 0000000..d4869cd
--- /dev/null
+++ b/gnu/packages/pytz.scm
@@ -0,0 +1,43 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages pytz)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system python))
+
+(define-public pytz
+  (package
+    (name "pytz")
+    (version "2013b")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://launchpad.net/pytz/main/" version
+                          "/+download/pytz-" version ".tar.bz2"))
+      (sha256
+       (base32
+        "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
+    (build-system python-build-system)
+    (home-page "https://launchpad.net/pytz")
+    (synopsis "The Python timezone library.")
+    (description
+     "This library allows accurate and cross platform timezone calculations
+using Python 2.4 or higher and provides access to the Olson timezone database.")
+    (license x11)))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/3] gnu: Add Babel.
  2013-05-23  2:08 [PATCH 0/3] Add babel Cyril Roelandt
  2013-05-23  2:08 ` [PATCH 1/3] python-build-system: add a check phase Cyril Roelandt
  2013-05-23  2:08 ` [PATCH 2/3] gnu: Add pytz Cyril Roelandt
@ 2013-05-23  2:08 ` Cyril Roelandt
  2013-05-23 12:19   ` Ludovic Courtès
  2 siblings, 1 reply; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-23  2:08 UTC (permalink / raw)
  To: bug-guix

* gnu/packages/babel.scm: New file.
* Makefile.am (MODULES): Add it.
---
 Makefile.am            |    1 +
 gnu/packages/babel.scm |   51 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 gnu/packages/babel.scm

diff --git a/Makefile.am b/Makefile.am
index 0a08edb..5bf3bef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,6 +72,7 @@ MODULES =					\
   gnu/packages/attr.scm				\
   gnu/packages/autotools.scm			\
   gnu/packages/avahi.scm			\
+  gnu/packages/babel.scm 			\
   gnu/packages/base.scm				\
   gnu/packages/bash.scm				\
   gnu/packages/bdb.scm				\
diff --git a/gnu/packages/babel.scm b/gnu/packages/babel.scm
new file mode 100644
index 0000000..d059572
--- /dev/null
+++ b/gnu/packages/babel.scm
@@ -0,0 +1,51 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages babel)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system python)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages pytz))
+
+(define-public babel
+  (package
+    (name "babel")
+    (version "0.9.6")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://ftp.edgewall.com/pub/babel/Babel-"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "03vmr54jq5vf3qw6kpdv7cdk7x7i2jhzyf1mawv2gk8zrxg0hfja"))))
+    (build-system python-build-system)
+    (inputs
+     `(("pytz" ,pytz)))
+    (home-page "http://babel.edgewall.org/")
+    (synopsis
+     "A collection of tools for internationalizing Python applications.")
+    (description
+     "Babel is composed of two major parts:
+- tools to build and work with gettext message catalogs
+- a Python interface to the CLDR (Common Locale Data Repository), providing
+access to various locale display names, localized number and date formatting,
+etc. ")
+    (license bsd-3)))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/3] python-build-system: add a check phase.
  2013-05-23  2:08 ` [PATCH 1/3] python-build-system: add a check phase Cyril Roelandt
@ 2013-05-23 12:05   ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2013-05-23 12:05 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Good catch!

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * guix/build/python-build-system.scm: new function.

The log should be:

* guix/build/python-build-system.scm (check): New procedure.
  (%standard-phases): Use it.

Modulo that, OK to commit.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] gnu: Add pytz.
  2013-05-23  2:08 ` [PATCH 2/3] gnu: Add pytz Cyril Roelandt
@ 2013-05-23 12:07   ` Ludovic Courtès
  2013-05-25 20:31     ` Cyril Roelandt
  2013-05-23 12:08   ` Ludovic Courtès
  1 sibling, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2013-05-23 12:07 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/pytz.scm: New file.
> * Makefile.am (MODULES): Add it.

OK to commit!

> +(define-public pytz
> +  (package
> +    (name "pytz")
> +    (version "2013b")

Does it include IANA’s raw tzdata, or does it use libc’s routines?  (The
version number makes me think it’s the former.)

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] gnu: Add pytz.
  2013-05-23  2:08 ` [PATCH 2/3] gnu: Add pytz Cyril Roelandt
  2013-05-23 12:07   ` Ludovic Courtès
@ 2013-05-23 12:08   ` Ludovic Courtès
  2013-05-28 21:54     ` [PATCH v2] " Cyril Roelandt
  1 sibling, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2013-05-23 12:08 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> +(define-module (gnu packages pytz)
> +  #:use-module (guix licenses)
> +  #:use-module (guix packages)
> +  #:use-module (guix download)
> +  #:use-module (guix build-system python))

Oh, and BTW, perhaps we could put it directly in python.scm?
We still have no clear guideline for this, but given that it’s a small
package, perhaps it’d be nice.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] gnu: Add Babel.
  2013-05-23  2:08 ` [PATCH 3/3] gnu: Add Babel Cyril Roelandt
@ 2013-05-23 12:19   ` Ludovic Courtès
  2013-05-28 23:41     ` Cyril Roelandt
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2013-05-23 12:19 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/babel.scm: New file.
> * Makefile.am (MODULES): Add it.

OK!

> +    (home-page "http://babel.edgewall.org/")
> +    (synopsis
> +     "A collection of tools for internationalizing Python applications.")

Rather “Tools for internationalizing Python applications” (no period).

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/3] gnu: Add pytz.
  2013-05-23 12:07   ` Ludovic Courtès
@ 2013-05-25 20:31     ` Cyril Roelandt
  0 siblings, 0 replies; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-25 20:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

On 05/23/2013 02:07 PM, Ludovic Courtès wrote:

> Does it include IANA’s raw tzdata, or does it use libc’s routines?  (The
> version number makes me think it’s the former.)
>

According to python.org:

"The standard library has no tzinfo instances, but there exists a 
third-party library which brings the IANA timezone database (also known 
as the Olson database) to Python: pytz."

Cyril.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2] gnu: Add pytz.
  2013-05-23 12:08   ` Ludovic Courtès
@ 2013-05-28 21:54     ` Cyril Roelandt
  2013-05-28 22:21       ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-28 21:54 UTC (permalink / raw)
  To: bug-guix

* gnu/packages/python.scm (pytz): New package.
---
 gnu/packages/python.scm |   25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 800b08c..eb3315c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -18,7 +18,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages python)
-  #:use-module ((guix licenses) #:select (psfl))
+  #:use-module ((guix licenses) #:select (psfl x11))
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gdbm)
@@ -27,7 +27,8 @@
   #:use-module (gnu packages patchelf)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python))
 
 (define-public python
   (package
@@ -106,3 +107,23 @@ expression of procedural code; full modularity, supporting hierarchical
 packages; exception-based error handling; and very high level dynamic
 data types.")
     (license psfl)))
+
+(define-public pytz
+  (package
+    (name "pytz")
+    (version "2013b")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "https://launchpad.net/pytz/main/" version
+                          "/+download/pytz-" version ".tar.bz2"))
+      (sha256
+       (base32
+        "19giwgfcrg0nr1gdv49qnmf2jb2ilkcfc7qyqvfpz4dp0p64ksv5"))))
+    (build-system python-build-system)
+    (home-page "https://launchpad.net/pytz")
+    (synopsis "The Python timezone library.")
+    (description
+     "This library allows accurate and cross platform timezone calculations
+using Python 2.4 or higher and provides access to the Olson timezone database.")
+    (license x11)))
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2] gnu: Add pytz.
  2013-05-28 21:54     ` [PATCH v2] " Cyril Roelandt
@ 2013-05-28 22:21       ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2013-05-28 22:21 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> * gnu/packages/python.scm (pytz): New package.
> ---
>  gnu/packages/python.scm |   25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)

Looks good to me, please push!

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] gnu: Add Babel.
  2013-05-23 12:19   ` Ludovic Courtès
@ 2013-05-28 23:41     ` Cyril Roelandt
  2013-05-29 21:45       ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-28 23:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

On 05/23/2013 02:19 PM, Ludovic Courtès wrote:
> Cyril Roelandt<tipecaml@gmail.com>  skribis:
>
>> * gnu/packages/babel.scm: New file.
>> * Makefile.am (MODULES): Add it.
>
> OK!
>


Well, maybe this should go to python.scm, just like pytz. What do you 
think ?

Cyril.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] gnu: Add Babel.
  2013-05-28 23:41     ` Cyril Roelandt
@ 2013-05-29 21:45       ` Ludovic Courtès
  2013-05-31 23:55         ` Cyril Roelandt
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2013-05-29 21:45 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 05/23/2013 02:19 PM, Ludovic Courtès wrote:
>> Cyril Roelandt<tipecaml@gmail.com>  skribis:
>>
>>> * gnu/packages/babel.scm: New file.
>>> * Makefile.am (MODULES): Add it.
>>
>> OK!
>>
>
>
> Well, maybe this should go to python.scm, just like pytz. What do you
> think ?

Yes, makes sense.

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 3/3] gnu: Add Babel.
  2013-05-29 21:45       ` Ludovic Courtès
@ 2013-05-31 23:55         ` Cyril Roelandt
  0 siblings, 0 replies; 14+ messages in thread
From: Cyril Roelandt @ 2013-05-31 23:55 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

On 05/29/2013 11:45 PM, Ludovic Courtès wrote:
> Cyril Roelandt<tipecaml@gmail.com>  skribis:
>
>> On 05/23/2013 02:19 PM, Ludovic Courtès wrote:
>>> Cyril Roelandt<tipecaml@gmail.com>   skribis:
>>>
>>>> * gnu/packages/babel.scm: New file.
>>>> * Makefile.am (MODULES): Add it.
>>>
>>> OK!
>>>
>>
>>
>> Well, maybe this should go to python.scm, just like pytz. What do you
>> think ?
>
> Yes, makes sense.
>

Pushed.

Cyril.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-06-01  0:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23  2:08 [PATCH 0/3] Add babel Cyril Roelandt
2013-05-23  2:08 ` [PATCH 1/3] python-build-system: add a check phase Cyril Roelandt
2013-05-23 12:05   ` Ludovic Courtès
2013-05-23  2:08 ` [PATCH 2/3] gnu: Add pytz Cyril Roelandt
2013-05-23 12:07   ` Ludovic Courtès
2013-05-25 20:31     ` Cyril Roelandt
2013-05-23 12:08   ` Ludovic Courtès
2013-05-28 21:54     ` [PATCH v2] " Cyril Roelandt
2013-05-28 22:21       ` Ludovic Courtès
2013-05-23  2:08 ` [PATCH 3/3] gnu: Add Babel Cyril Roelandt
2013-05-23 12:19   ` Ludovic Courtès
2013-05-28 23:41     ` Cyril Roelandt
2013-05-29 21:45       ` Ludovic Courtès
2013-05-31 23:55         ` Cyril Roelandt

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).