unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 0/7] Some new python packages
@ 2016-04-17 20:50 Hartmut Goebel
  2016-04-17 20:50 ` [PATCH 1/7] gnu: Add python-tblib and python2-tblib Hartmut Goebel
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

Enclosed please find patches adding nwe Python packages for both Python 3 and
Python 2. These are needed for run the django test-suite (more to come).

Hartmut Goebel (7):
  gnu: Add python-tblib and python2-tblib
  gnu: add python-sqlparse and python2-sqlparse
  gnu: add python-selenium and python2-selenium
  gnu: Add python2-ipaddr, a Python-2-only package
  gnu: add python-maxminddb and python2-maxminddb
  gnu: add comment pointing to python-requests-mock in openstack
  gnu: add python-geoip2 and python2-geoip2

 gnu/packages/python.scm | 210 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 210 insertions(+)

-- 
2.7.4

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

* [PATCH 1/7] gnu: Add python-tblib and python2-tblib
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:19   ` Leo Famulari
  2016-04-17 20:50 ` [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse Hartmut Goebel
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

* packages/python.scm (python-tblib) (python2-tblib): New
  functions.
---
 gnu/packages/python.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0379352..70db0e1 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
+;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -8712,3 +8713,42 @@ respectively.")
 (define-public python2-cysignals
   (package-with-python2 python-cysignals))
 
+(define-public python-tblib
+  (package
+    (name "python-tblib")
+    (version "1.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "tblib" version))
+       (sha256
+        (base32
+         "02iahfkfa927hb4jq2bak36ldihwapzacfiq5lyxg8llwn98a1yi"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+        (replace 'check
+         (lambda _
+           (zero? (system* "py.test" "--ignore=setup.py"
+                           "--ignore=docs/conf.py"
+                           "--ignore=ci/appveyor-download.py")))))))
+    (inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-six" ,python-six)))
+    (home-page "https://github.com/ionelmc/python-tblib")
+    (synopsis "Traceback serialization library")
+    (description
+     "Traceback serialization allows you to:
+
+* Pickle tracebacks and raise exceptions with pickled tracebacks in different
+  processes.  This allows better error handling when running code over
+  multiple processes (imagine multiprocessing, billiard, futures, celery etc).
+
+* Parse traceback strings and raise with the parsed tracebacks.")
+    (license bsd-3)))
+
+(define-public python2-tblib
+  (package-with-python2 python-tblib))
-- 
2.7.4

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

* [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
  2016-04-17 20:50 ` [PATCH 1/7] gnu: Add python-tblib and python2-tblib Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:23   ` Leo Famulari
  2016-04-17 20:50 ` [PATCH 3/7] gnu: add python-selenium and python2-selenium Hartmut Goebel
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-sqlparse) (python2-sqlparse):
  New functions.
---
 gnu/packages/python.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 70db0e1..b77ab15 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8752,3 +8752,39 @@ respectively.")
 
 (define-public python2-tblib
   (package-with-python2 python-tblib))
+
+(define-public python-sqlparse
+  (package
+    (name "python-sqlparse")
+    (version "0.1.19")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "sqlparse" version))
+       (sha256
+        (base32
+         "1s2fvaxgh9kqzrd6iwy5h7i61ckn05plx9np13zby93z3hdbx5nq"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* _
+             ;; setup.py-integrated 2to3 only affects the build files, but
+             ;; py.test is using the source files. So we need to convert them
+             ;; manually.
+             (if (zero? (system* "python3"))
+                 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests")
+                 #t)
+             (zero? (system* "py.test")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/andialbrecht/sqlparse")
+    (synopsis "Non-validating SQL parser")
+    (description "sqlparse is a non-validating SQL parser for Python.  It
+provides support for parsing, splitting and formatting SQL statements.")
+    (license bsd-3)))
+
+(define-public python2-sqlparse
+  (package-with-python2 python-sqlparse))
-- 
2.7.4

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

* [PATCH 3/7] gnu: add python-selenium and python2-selenium
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
  2016-04-17 20:50 ` [PATCH 1/7] gnu: Add python-tblib and python2-tblib Hartmut Goebel
  2016-04-17 20:50 ` [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:12   ` Leo Famulari
  2016-04-17 20:50 ` [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package Hartmut Goebel
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-selenium) (python2-selenium):
  New functions.
---
 gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index b77ab15..d04c85c 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8788,3 +8788,38 @@ provides support for parsing, splitting and formatting SQL statements.")
 
 (define-public python2-sqlparse
   (package-with-python2 python-sqlparse))
+
+
+(define-public python-selenium
+  (package
+    (name "python-selenium")
+    (version "2.53.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "selenium" version))
+       (sha256
+        (base32
+         "1pj0ci4dxwfa0pkvjc60k7pw74zy6ay473mnzckbb58jlhc994jk"))))
+    (build-system python-build-system)
+    (arguments
+     ;; todo: enable the tests - may be very cumbersum
+     `(#:tests? #f))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (home-page "http://www.seleniumhq.org/")
+    (synopsis "Python bindings for Selenium")
+    (description "Selenium automates browsers.  That's it! What you do with
+that power is entirely up to you.  Primarily, it is for automating web
+applications for testing purposes, but is certainly not limited to just that.
+Boring web-based administration tasks can (and should!) also be automated as
+well.
+
+Selenium has the support of some of the largest browser vendors who have
+taken (or are taking) steps to make Selenium a native part of their browser.
+It is also the core technology in countless other browser automation tools,
+APIs and frameworks.")
+    (license asl2.0)))
+
+(define-public python2-selenium
+  (package-with-python2 python-selenium))
-- 
2.7.4

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

* [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
                   ` (2 preceding siblings ...)
  2016-04-17 20:50 ` [PATCH 3/7] gnu: add python-selenium and python2-selenium Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:20   ` Leo Famulari
  2016-04-17 20:50 ` [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb Hartmut Goebel
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm: (python2-ipaddr): New function.
---
 gnu/packages/python.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d04c85c..f0e00dd 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5785,6 +5785,30 @@ IPv6 addresses and networks.  This is a port of the Python 3.3 ipaddress
 module to older versions of Python.")
     (license psfl)))
 
+(define-public python2-ipaddr
+  (package
+    (name "python2-ipaddr")
+    (version "2.1.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ipaddr" version))
+       (sha256
+        (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* _
+             (zero? (system* "python" "ipaddr_test.py")))))))
+    (home-page "https://github.com/google/ipaddr-py")
+    (synopsis "IP address manipulation library by Google")
+    (description
+     "Library for working with IP addresses, both IPv4 and IPv6.")
+    (license asl2.0)))
+
 (define-public python-idna
   (package
     (name "python-idna")
-- 
2.7.4

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

* [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
                   ` (3 preceding siblings ...)
  2016-04-17 20:50 ` [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:14   ` Leo Famulari
  2016-04-17 20:50 ` [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack Hartmut Goebel
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm: (python-maxminddb) (python2-maxminddb):
  New functions.
---
 gnu/packages/python.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index f0e00dd..43e0657 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -8847,3 +8847,41 @@ APIs and frameworks.")
 
 (define-public python2-selenium
   (package-with-python2 python-selenium))
+
+(define-public python-maxminddb
+  (package
+    (name "python-maxminddb")
+    (version "1.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "maxminddb" version))
+       (sha256
+        (base32
+         "1f7smwdn5x3rnjzyl46n7dmxpjis6qkb6akk5w2nnc8ik936rgq0"))))
+    (build-system python-build-system)
+    (arguments
+     ;; tests require a copy of the maxminddb which is not included
+     `(#:tests? #f))
+    (inputs
+     ;; todo: if libmaxmind is available, add it here to get the C-extension
+     `(("python-setuptools" ,python-setuptools)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "http://www.maxmind.com/")
+    (synopsis "Reader for the MaxMind DB format")
+    (description "This is a Python module for reading MaxMind DB files.  The
+module includes both a pure Python reader and an optional C extension.
+
+MaxMind DB is a binary file format that stores data indexed by IP address
+subnets (IPv4 or IPv6).")
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-maxminddb))))))
+
+(define-public python2-maxminddb
+  (let ((base (package-with-python2 (strip-python2-variant python-maxminddb))))
+    (package (inherit base)
+      (inputs
+       `(("python2-ipaddr" ,python2-ipaddr)
+         ,@(package-inputs base))))))
+
-- 
2.7.4

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

* [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
                   ` (4 preceding siblings ...)
  2016-04-17 20:50 ` [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:21   ` Leo Famulari
  2016-04-17 20:50 ` [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2 Hartmut Goebel
  2016-04-18 20:08 ` [PATCH 0/7] Some new python packages Leo Famulari
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

I did expect this package to be defined in python.scm.

* gnu/packages/python.scm (python-requests): comment added
---
 gnu/packages/python.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 43e0657..197f236 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2245,6 +2245,10 @@ than Python’s urllib2 library.")
 (define-public python2-requests
   (package-with-python2 python-requests))
 
+;;
+;; Note: python-requests-mock is defined in module gnu packages openstack
+;;
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.7.4

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

* [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
                   ` (5 preceding siblings ...)
  2016-04-17 20:50 ` [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack Hartmut Goebel
@ 2016-04-17 20:50 ` Hartmut Goebel
  2016-04-18 20:17   ` Leo Famulari
  2016-04-18 20:08 ` [PATCH 0/7] Some new python packages Leo Famulari
  7 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-17 20:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/python.scm (python-geoip2) (pythons-geoip2):
  New functions.
---
 gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 197f236..330be07 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -63,6 +63,7 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages openstack)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -8889,3 +8890,36 @@ subnets (IPv4 or IPv6).")
        `(("python2-ipaddr" ,python2-ipaddr)
          ,@(package-inputs base))))))
 
+(define-public python-geoip2
+  (package
+    (name "python-geoip2")
+    (version "2.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "geoip2" version))
+       (sha256
+        (base32
+         "0jxh5p0d2ff1snv9n2xmjib2qw6vz0s2jgcdh69xblfssskgqnr6"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f)) ; tests require a copy of the database
+    (inputs
+     `(("python-maxminddb" ,python-maxminddb) ; >=1.1.0
+       ("python-requests" ,python-requests) ; >=2.4
+       ("python-setuptools" ,python-setuptools)))
+    (native-inputs
+     `(("python-requests-mock" ,python-requests-mock)
+       ("python-six" ,python-six)))
+    (home-page "http://www.maxmind.com/")
+    (synopsis "MaxMind GeoIP2 API")
+    (description "Provides an API for the GeoIP2 web services and databases.
+The API also works with MaxMind’s free GeoLite2 databases.")
+    (license asl2.0)
+    (properties `((python2-variant . ,(delay python2-mayminddb))))))
+
+(define-public python2-geoip2
+  (let ((base (package-with-python2 (strip-python2-variant python-geoip2))))
+    (package (inherit base)
+      (inputs
+       `(("python2-ipaddr" ,python2-ipaddr)
+         ,@(package-inputs base))))))
-- 
2.7.4

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

* Re: [PATCH 0/7] Some new python packages
  2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
                   ` (6 preceding siblings ...)
  2016-04-17 20:50 ` [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2 Hartmut Goebel
@ 2016-04-18 20:08 ` Leo Famulari
  2016-04-18 20:49   ` Hartmut Goebel
  7 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:08 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:50PM +0200, Hartmut Goebel wrote:
> Enclosed please find patches adding nwe Python packages for both Python 3 and
> Python 2. These are needed for run the django test-suite (more to come).

Thanks for the patches!

I'm going to review these superficially; I won't try to actually build
or run them until the django test suite is ready to be tested, unless
you can tell me how to do so.

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

* Re: [PATCH 3/7] gnu: add python-selenium and python2-selenium
  2016-04-17 20:50 ` [PATCH 3/7] gnu: add python-selenium and python2-selenium Hartmut Goebel
@ 2016-04-18 20:12   ` Leo Famulari
  0 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:12 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:53PM +0200, Hartmut Goebel wrote:
> * gnu/packages/python.scm (python-selenium) (python2-selenium):
>   New functions.

We use the phrase "New variables" when adding new package definitions to
an existing package module.

> ---
>  gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index b77ab15..d04c85c 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -8788,3 +8788,38 @@ provides support for parsing, splitting and formatting SQL statements.")
>  
>  (define-public python2-sqlparse
>    (package-with-python2 python-sqlparse))
> +

Extra blank line ^

> +    (arguments
> +     ;; todo: enable the tests - may be very cumbersum
> +     `(#:tests? #f))

Can you say what the difficulty is? We prefer to run upstream tests when
possible.

> +    (native-inputs
> +     `(("python-setuptools" ,python-setuptools)))

Did you check if this is really needed? Usually, only the python-2
package variants require setuptools as an input. You can see commit
13f3ff35 for an example of how to do this.

> +    (home-page "http://www.seleniumhq.org/")
> +    (synopsis "Python bindings for Selenium")
> +    (description "Selenium automates browsers.  That's it! What you do with
> +that power is entirely up to you.  Primarily, it is for automating web
> +applications for testing purposes, but is certainly not limited to just that.
> +Boring web-based administration tasks can (and should!) also be automated as
> +well.
> +
> +Selenium has the support of some of the largest browser vendors who have
> +taken (or are taking) steps to make Selenium a native part of their browser.
> +It is also the core technology in countless other browser automation tools,
> +APIs and frameworks.")

A nit-pick, but it would be nice if this was a little less
"conversational". That is, things like "That's it! What you do [...]"
can be removed.

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

* Re: [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb
  2016-04-17 20:50 ` [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb Hartmut Goebel
@ 2016-04-18 20:14   ` Leo Famulari
  2016-04-18 21:02     ` Hartmut Goebel
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:14 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:55PM +0200, Hartmut Goebel wrote:
> * gnu/packages/python.scm: (python-maxminddb) (python2-maxminddb):
>   New functions.

[...]

> +    (arguments
> +     ;; tests require a copy of the maxminddb which is not included
> +     `(#:tests? #f))

Should the maxminddb be packaged so that we can run the tests?

> +    (synopsis "Reader for the MaxMind DB format")
> +    (description "This is a Python module for reading MaxMind DB files.  The
> +module includes both a pure Python reader and an optional C extension.
> +
> +MaxMind DB is a binary file format that stores data indexed by IP address
> +subnets (IPv4 or IPv6).")

Can you explain to the reader what the purpose of the MaxMind DB is?

> +    (properties `((python2-variant . ,(delay python2-maxminddb))))))
> +
> +(define-public python2-maxminddb
> +  (let ((base (package-with-python2 (strip-python2-variant python-maxminddb))))
> +    (package (inherit base)
> +      (inputs
> +       `(("python2-ipaddr" ,python2-ipaddr)
> +         ,@(package-inputs base))))))

I see you already know to use the python2-variant system. Feel free to
move setuptools here if that works for python-maxminddb.

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

* Re: [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2
  2016-04-17 20:50 ` [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2 Hartmut Goebel
@ 2016-04-18 20:17   ` Leo Famulari
  0 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:17 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:57PM +0200, Hartmut Goebel wrote:
> * gnu/packages/python.scm (python-geoip2) (pythons-geoip2):
>   New functions.

[...]

> +    (arguments `(#:tests? #f)) ; tests require a copy of the database

The maxminddb database?

> +    (inputs
> +     `(("python-maxminddb" ,python-maxminddb) ; >=1.1.0
> +       ("python-requests" ,python-requests) ; >=2.4
> +       ("python-setuptools" ,python-setuptools)))

If setuptools is necessary, it should typically be a native-input, since
it is typically only used at build-time; there are a few exceptions. Is
that not the case for geoip2?

> +    (synopsis "MaxMind GeoIP2 API")
> +    (description "Provides an API for the GeoIP2 web services and databases.
> +The API also works with MaxMind’s free GeoLite2 databases.")

Again, can you give a little more context for the reader?

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

* Re: [PATCH 1/7] gnu: Add python-tblib and python2-tblib
  2016-04-17 20:50 ` [PATCH 1/7] gnu: Add python-tblib and python2-tblib Hartmut Goebel
@ 2016-04-18 20:19   ` Leo Famulari
  0 siblings, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:19 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:51PM +0200, Hartmut Goebel wrote:
> * packages/python.scm (python-tblib) (python2-tblib): New
>   functions.

[...]

> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +        (replace 'check
> +         (lambda _
> +           (zero? (system* "py.test" "--ignore=setup.py"
> +                           "--ignore=docs/conf.py"
> +                           "--ignore=ci/appveyor-download.py")))))))

Can you add a comment explaining why we have to replace the check phase
and what these options are doing?

[...]

> +    (description
> +     "Traceback serialization allows you to:
> +
> +* Pickle tracebacks and raise exceptions with pickled tracebacks in different
> +  processes.  This allows better error handling when running code over
> +  multiple processes (imagine multiprocessing, billiard, futures, celery etc).
> +
> +* Parse traceback strings and raise with the parsed tracebacks.")

Please see the package definition of python-debian for an example of how
to make these sorts of lists in texinfo (which is what the description
is).

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

* Re: [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package
  2016-04-17 20:50 ` [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package Hartmut Goebel
@ 2016-04-18 20:20   ` Leo Famulari
  2016-04-18 21:09     ` Hartmut Goebel
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:20 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:54PM +0200, Hartmut Goebel wrote:
> * gnu/packages/python.scm: (python2-ipaddr): New function.

[...]

> +    (synopsis "IP address manipulation library by Google")
> +    (description
> +     "Library for working with IP addresses, both IPv4 and IPv6.")

Can you give any more information about the software?

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

* Re: [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack
  2016-04-17 20:50 ` [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack Hartmut Goebel
@ 2016-04-18 20:21   ` Leo Famulari
  2016-04-18 21:16     ` Leo Famulari
  2016-04-19  8:43     ` Alex Kost
  0 siblings, 2 replies; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:21 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:56PM +0200, Hartmut Goebel wrote:
> I did expect this package to be defined in python.scm.

You can figure out where package foo is defined with `guix package
--show=foo`. That is more discoverable than a comment in the code base.

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

* Re: [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse
  2016-04-17 20:50 ` [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse Hartmut Goebel
@ 2016-04-18 20:23   ` Leo Famulari
  2016-04-18 21:10     ` Hartmut Goebel
  0 siblings, 1 reply; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 20:23 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Sun, Apr 17, 2016 at 10:50:52PM +0200, Hartmut Goebel wrote:
> * gnu/packages/python.scm (python-sqlparse) (python2-sqlparse):
>   New functions.

[...]

> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda* _
> +             ;; setup.py-integrated 2to3 only affects the build files, but
> +             ;; py.test is using the source files. So we need to convert them
> +             ;; manually.
> +             (if (zero? (system* "python3"))
> +                 (system* "2to3" "--no-diff" "-wn" "sqlparse" "tests")
> +                 #t)

Is this running the python3 interpreter with no arguments in order to
see if it exists, and then doing 2to3 if it does?

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

* Re: [PATCH 0/7] Some new python packages
  2016-04-18 20:08 ` [PATCH 0/7] Some new python packages Leo Famulari
@ 2016-04-18 20:49   ` Hartmut Goebel
  0 siblings, 0 replies; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-18 20:49 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Am 18.04.2016 um 22:08 schrieb Leo Famulari:
> I'm going to review these superficially; I won't try to actually build
> or run them until the django test suite is ready to be tested, unless
> you can tell me how to do so. 

I'll briefly answer on your comments. Please not that mot motivation for
including these tests is solely to enhance the django test-suite.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb
  2016-04-18 20:14   ` Leo Famulari
@ 2016-04-18 21:02     ` Hartmut Goebel
  0 siblings, 0 replies; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-18 21:02 UTC (permalink / raw)
  To: guix-devel

Am 18.04.2016 um 22:14 schrieb Leo Famulari:
> Should the maxminddb be packaged so that we can run the tests? 

When installing the package, this database in not installed. The
installation instructions of that package does not a hint on it. I
assume this database being quite large (several GB), since it contains
geo-information. I would not require everybody rebuilding this package
to download that much data.

>
> Can you explain to the reader what the purpose of the MaxMind DB is?

Sorry, I can't. it is used by geoip2 and this is the reason for
including it.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package
  2016-04-18 20:20   ` Leo Famulari
@ 2016-04-18 21:09     ` Hartmut Goebel
  2016-04-19  8:41       ` Alex Kost
  0 siblings, 1 reply; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-18 21:09 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Am 18.04.2016 um 22:20 schrieb Leo Famulari:
>> > +    (synopsis "IP address manipulation library by Google")
>> > +    (description
>> > +     "Library for working with IP addresses, both IPv4 and IPv6.")
> Can you give any more information about the software?

Pardon? That's all the project seay. What more would you expect?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse
  2016-04-18 20:23   ` Leo Famulari
@ 2016-04-18 21:10     ` Hartmut Goebel
  0 siblings, 0 replies; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-18 21:10 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Am 18.04.2016 um 22:23 schrieb Leo Famulari:
> Is this running the python3 interpreter with no arguments in order to
> see if it exists, and then doing 2to3 if it does?

Ack. I asume one could do this by manipulating the output of
"packaged-wiht-python2". But I only learned of how to manipulate this
long after.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

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

* Re: [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack
  2016-04-18 20:21   ` Leo Famulari
@ 2016-04-18 21:16     ` Leo Famulari
  2016-04-19  8:43     ` Alex Kost
  1 sibling, 0 replies; 25+ messages in thread
From: Leo Famulari @ 2016-04-18 21:16 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Mon, Apr 18, 2016 at 04:21:26PM -0400, Leo Famulari wrote:
> On Sun, Apr 17, 2016 at 10:50:56PM +0200, Hartmut Goebel wrote:
> > I did expect this package to be defined in python.scm.
> 
> You can figure out where package foo is defined with `guix package
> --show=foo`. That is more discoverable than a comment in the code base.

Also, the output of --show is in the recutils format [0], so if you
install recutils, then you can do things like this:

$ guix package --show=python-requests-mock | recsel -P location 
gnu/packages/openstack.scm:238:2

[0]
https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-package.html#Invoking-guix-package

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

* Re: [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package
  2016-04-18 21:09     ` Hartmut Goebel
@ 2016-04-19  8:41       ` Alex Kost
  2016-04-20 17:01         ` Ludovic Courtès
  0 siblings, 1 reply; 25+ messages in thread
From: Alex Kost @ 2016-04-19  8:41 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hartmut Goebel (2016-04-19 00:09 +0300) wrote:

> Am 18.04.2016 um 22:20 schrieb Leo Famulari:
>>> > +    (synopsis "IP address manipulation library by Google")
>>> > +    (description
>>> > +     "Library for working with IP addresses, both IPv4 and IPv6.")
>> Can you give any more information about the software?
>
> Pardon? That's all the project seay. What more would you expect?

Yeah, it's hard to invent a description when the upstream doesn't
provide it.  What about this:

  IPaddr is a fast and lightweight Python library used to create and
  manipulate IPv4 and IPv6 addresses and networks.

This is derived from the python module description:
<https://github.com/google/ipaddr-py/blob/master/ipaddr.py>

Note: I'm bad at writing descriptions.

-- 
Alex

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

* Re: [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack
  2016-04-18 20:21   ` Leo Famulari
  2016-04-18 21:16     ` Leo Famulari
@ 2016-04-19  8:43     ` Alex Kost
  1 sibling, 0 replies; 25+ messages in thread
From: Alex Kost @ 2016-04-19  8:43 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari (2016-04-18 23:21 +0300) wrote:

> On Sun, Apr 17, 2016 at 10:50:56PM +0200, Hartmut Goebel wrote:
>> I did expect this package to be defined in python.scm.
>
> You can figure out where package foo is defined with `guix package
> --show=foo`. That is more discoverable than a comment in the code base.

Alternatively, you can do "guix edit foo" and look what module it is.

-- 
Alex

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

* Re: [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package
  2016-04-19  8:41       ` Alex Kost
@ 2016-04-20 17:01         ` Ludovic Courtès
  0 siblings, 0 replies; 25+ messages in thread
From: Ludovic Courtès @ 2016-04-20 17:01 UTC (permalink / raw)
  To: Alex Kost; +Cc: guix-devel

Alex Kost <alezost@gmail.com> skribis:

> Hartmut Goebel (2016-04-19 00:09 +0300) wrote:
>
>> Am 18.04.2016 um 22:20 schrieb Leo Famulari:
>>>> > +    (synopsis "IP address manipulation library by Google")
>>>> > +    (description
>>>> > +     "Library for working with IP addresses, both IPv4 and IPv6.")
>>> Can you give any more information about the software?
>>
>> Pardon? That's all the project seay. What more would you expect?
>
> Yeah, it's hard to invent a description when the upstream doesn't
> provide it.  What about this:
>
>   IPaddr is a fast and lightweight Python library used to create and
>   manipulate IPv4 and IPv6 addresses and networks.

Sounds good!

But yeah, I agree that it’s hard to do any better if upstream doesn’t
even bother.

(For the record, Hartmut,
<https://www.gnu.org/software/guix/manual/html_node/Synopses-and-Descriptions.html>
gives guidelines about these things.)

Thanks,
Ludo’.

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

* [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack
  2016-04-21 19:19 [PATCH 0/6] Updated: " Hartmut Goebel
@ 2016-04-21 19:19 ` Hartmut Goebel
  0 siblings, 0 replies; 25+ messages in thread
From: Hartmut Goebel @ 2016-04-21 19:19 UTC (permalink / raw)
  To: guix-devel

I did expect this package to be defined in python.scm.

* gnu/packages/python.scm (python-requests): comment added
---
 gnu/packages/python.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 43e0657..197f236 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2245,6 +2245,10 @@ than Python’s urllib2 library.")
 (define-public python2-requests
   (package-with-python2 python-requests))
 
+;;
+;; Note: python-requests-mock is defined in module gnu packages openstack
+;;
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.7.4

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

end of thread, other threads:[~2016-04-21 19:20 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17 20:50 [PATCH 0/7] Some new python packages Hartmut Goebel
2016-04-17 20:50 ` [PATCH 1/7] gnu: Add python-tblib and python2-tblib Hartmut Goebel
2016-04-18 20:19   ` Leo Famulari
2016-04-17 20:50 ` [PATCH 2/7] gnu: add python-sqlparse and python2-sqlparse Hartmut Goebel
2016-04-18 20:23   ` Leo Famulari
2016-04-18 21:10     ` Hartmut Goebel
2016-04-17 20:50 ` [PATCH 3/7] gnu: add python-selenium and python2-selenium Hartmut Goebel
2016-04-18 20:12   ` Leo Famulari
2016-04-17 20:50 ` [PATCH 4/7] gnu: Add python2-ipaddr, a Python-2-only package Hartmut Goebel
2016-04-18 20:20   ` Leo Famulari
2016-04-18 21:09     ` Hartmut Goebel
2016-04-19  8:41       ` Alex Kost
2016-04-20 17:01         ` Ludovic Courtès
2016-04-17 20:50 ` [PATCH 5/7] gnu: add python-maxminddb and python2-maxminddb Hartmut Goebel
2016-04-18 20:14   ` Leo Famulari
2016-04-18 21:02     ` Hartmut Goebel
2016-04-17 20:50 ` [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack Hartmut Goebel
2016-04-18 20:21   ` Leo Famulari
2016-04-18 21:16     ` Leo Famulari
2016-04-19  8:43     ` Alex Kost
2016-04-17 20:50 ` [PATCH 7/7] gnu: add python-geoip2 and python2-geoip2 Hartmut Goebel
2016-04-18 20:17   ` Leo Famulari
2016-04-18 20:08 ` [PATCH 0/7] Some new python packages Leo Famulari
2016-04-18 20:49   ` Hartmut Goebel
  -- strict thread matches above, loose matches on Subject: below --
2016-04-21 19:19 [PATCH 0/6] Updated: " Hartmut Goebel
2016-04-21 19:19 ` [PATCH 6/7] gnu: add comment pointing to python-requests-mock in openstack Hartmut Goebel

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).