unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 05/10] gnu: Add python-cleo and python2-cleo.
@ 2016-06-23 15:19 宋文武
  2016-06-23 15:20 ` [PATCH 06/10] gnu: Add python-lazy-object-proxy and python2-lazy-object-proxy 宋文武
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: 宋文武 @ 2016-06-23 15:19 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1dc5212..d1d127b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9391,3 +9391,31 @@ Wikipedia code samples at
 (define-public python2-pylev
   (package-with-python2 python-pylev))
 
+(define-public python-cleo
+  (package
+    (name "python-cleo")
+    (version "0.4.1")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "cleo" version))
+              (sha256
+               (base32
+                "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-psutil" ,python-psutil)
+       ("python-pylev" ,python-pylev)
+       ("python-setuptools" ,python-setuptools)
+       ;; For testing
+       ("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/sdispater/cleo")
+    (synopsis "Command-line arguments library for Python")
+    (description
+     "Cleo allows you to create command-line commands with signature in
+docstring and colored output.")
+    (license license:expat)))
+
+(define-public python2-cleo
+  (package-with-python2 python-cleo))
+
-- 
2.8.4

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

* [PATCH 06/10] gnu: Add python-lazy-object-proxy and python2-lazy-object-proxy.
  2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
@ 2016-06-23 15:20 ` 宋文武
  2016-06-23 15:20 ` [PATCH 07/10] gnu: Add python-dnspython and python2-dnspython 宋文武
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: 宋文武 @ 2016-06-23 15:20 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

* gnu/packages/python.scm (python-lazy-object-proxy)
(python2-lazy-object-proxy): New variables.
---
 gnu/packages/python.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d1d127b..dc9879a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9419,3 +9419,26 @@ docstring and colored output.")
 (define-public python2-cleo
   (package-with-python2 python-cleo))
 
+(define-public python-lazy-object-proxy
+  (package
+    (name "python-lazy-object-proxy")
+    (version "1.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "lazy-object-proxy" version))
+              (sha256
+               (base32
+                "0s22aqqkdscyh8sjspyyax7qa1aiz8p4midrnyf39717fhfczm6x"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
+    (synopsis "Lazy object proxy for python")
+    (description
+     "Lazy object proxy is an object that wraps a callable but defers the call
+until the object is actually required, and caches the result of said call.")
+    (license bsd-2)))
+
+(define-public python2-lazy-object-proxy
+  (package-with-python2 python-lazy-object-proxy))
+
-- 
2.8.4

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

* [PATCH 07/10] gnu: Add python-dnspython and python2-dnspython.
  2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
  2016-06-23 15:20 ` [PATCH 06/10] gnu: Add python-lazy-object-proxy and python2-lazy-object-proxy 宋文武
@ 2016-06-23 15:20 ` 宋文武
  2016-06-23 15:20 ` [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator 宋文武
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 14+ messages in thread
From: 宋文武 @ 2016-06-23 15:20 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index dc9879a..ff3cb99 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9442,3 +9442,29 @@ until the object is actually required, and caches the result of said call.")
 (define-public python2-lazy-object-proxy
   (package-with-python2 python-lazy-object-proxy))
 
+(define-public python-dnspython
+  (package
+  (name "python-dnspython")
+  (version "1.14.0")
+  (source (origin
+            (method url-fetch)
+            (uri (string-append "http://www.dnspython.org/kits/"
+                                version "/dnspython-" version ".tar.gz"))
+            (sha256
+             (base32
+              "1z472r63gdqsxhsxj3plr5vs478yf4303vrqxxpsccc940g441hl"))))
+  (build-system python-build-system)
+  (arguments '(#:tests? #f)) ; XXX: requires internet access
+  (native-inputs
+   `(("python-setuptools" ,python-setuptools)))
+  (home-page "http://www.dnspython.org")
+  (synopsis "DNS toolkit for Python")
+  (description
+   "dnspython is a DNS toolkit for Python.  It supports almost all record
+types.  It can be used for queries, zone transfers, and dynamic updates.
+It supports TSIG authenticated messages and EDNS0.")
+  (license license:expat)))
+
+(define-public python2-dnspython
+  (package-with-python2 python-dnspython))
+
-- 
2.8.4

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

* [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.
  2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
  2016-06-23 15:20 ` [PATCH 06/10] gnu: Add python-lazy-object-proxy and python2-lazy-object-proxy 宋文武
  2016-06-23 15:20 ` [PATCH 07/10] gnu: Add python-dnspython and python2-dnspython 宋文武
@ 2016-06-23 15:20 ` 宋文武
  2016-06-25 17:58   ` Leo Famulari
  2016-06-23 15:20 ` [PATCH 09/10] gnu: Add python-ukpostcodeparser and python2-ukpostcodeparser 宋文武
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: 宋文武 @ 2016-06-23 15:20 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index ff3cb99..68123cc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS0.")
 (define-public python2-dnspython
   (package-with-python2 python-dnspython))
 
+(define-public python-email-validator
+  (package
+    (name "python-email-validator")
+    (version "1.0.1")
+    (source
+     (origin (method url-fetch)
+             (uri (pypi-uri "email_validator" version))
+             (sha256
+              (base32
+               "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'use-dnspython
+           (lambda _
+             (substitute* "setup.py"
+               (("dnspython3") "dnspython"))
+             #t)))))
+    (native-inputs
+     `(("python-dnspython" ,python-dnspython)
+       ("python-idna" ,python-idna)
+       ("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/JoshData/python-email-validator")
+    (synopsis "Email address validation library for Python")
+    (description
+     "This library validates email address syntax and deliverability.")
+    (license cc0)))
+
+(define-public python2-email-validator
+  (package-with-python2 python-email-validator))
+
-- 
2.8.4

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

* [PATCH 09/10] gnu: Add python-ukpostcodeparser and python2-ukpostcodeparser.
  2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
                   ` (2 preceding siblings ...)
  2016-06-23 15:20 ` [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator 宋文武
@ 2016-06-23 15:20 ` 宋文武
  2016-06-23 15:20 ` [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory 宋文武
  2016-06-25 17:58 ` [PATCH 05/10] gnu: Add python-cleo and python2-cleo Leo Famulari
  5 siblings, 0 replies; 14+ messages in thread
From: 宋文武 @ 2016-06-23 15:20 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 68123cc..50d9ee9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9500,3 +9500,25 @@ It supports TSIG authenticated messages and EDNS0.")
 (define-public python2-email-validator
   (package-with-python2 python-email-validator))
 
+(define-public python-ukpostcodeparser
+  (package
+    (name "python-ukpostcodeparser")
+    (version "1.0.3")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "UkPostcodeParser" version))
+              (sha256
+               (base32
+                "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)))
+    (home-page "https://github.com/hamstah/ukpostcodeparser")
+    (synopsis "UK Postcode parser for Python")
+    (description
+     "This library provides the @code{parse_uk_postcode} function for
+parsing UK postcodes.")
+    (license license:expat)))
+
+(define-public python2-ukpostcodeparser
+  (package-with-python2 python-ukpostcodeparser))
-- 
2.8.4

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

* [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory.
  2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
                   ` (3 preceding siblings ...)
  2016-06-23 15:20 ` [PATCH 09/10] gnu: Add python-ukpostcodeparser and python2-ukpostcodeparser 宋文武
@ 2016-06-23 15:20 ` 宋文武
  2016-06-25 17:58   ` Leo Famulari
  2016-06-25 17:58 ` [PATCH 05/10] gnu: Add python-cleo and python2-cleo Leo Famulari
  5 siblings, 1 reply; 14+ messages in thread
From: 宋文武 @ 2016-06-23 15:20 UTC (permalink / raw)
  To: guix-devel; +Cc: 宋文武

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

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 50d9ee9..7f3f95d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9522,3 +9522,50 @@ parsing UK postcodes.")
 
 (define-public python2-ukpostcodeparser
   (package-with-python2 python-ukpostcodeparser))
+
+(define-public python-fake-factory
+  (package
+  (name "python-fake-factory")
+  (version "0.5.7")
+  (source (origin
+            (method url-fetch)
+            (uri (pypi-uri "fake-factory" version))
+            (sha256
+             (base32
+              "1chmarnrdzn4r017n8qlic0m0bbnhw04s3hkwribjvm3mqpb6pa0"))))
+  (build-system python-build-system)
+  (arguments
+   '(#:phases
+     (modify-phases %standard-phases
+       (add-before 'check 'disable-failing-test
+         ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
+         ;;      first_name, last_name = name.split()
+         ;; ValueError: too many values to unpack (expected 2)
+         (lambda _
+           (delete-file "faker/tests/ne_np/__init__.py")
+           #t)))))
+  (native-inputs
+   `(("python-dateutil" ,python-dateutil-2)
+     ("python-setuptools" ,python-setuptools)
+     ("python-six" ,python-six)
+     ;; For testing
+     ("python-email-validator" ,python-email-validator)
+     ("python-mock" ,python-mock)
+     ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
+  (home-page "http://github.com/joke2k/faker")
+  (synopsis "Python package that generates fake data")
+  (description
+   "Faker is a Python package that generates fake data such as names,
+addresses, and phone numbers.")
+  (license license:expat)
+  (properties `((python2-variant . ,(delay python2-fake-factory))))))
+
+(define-public python2-fake-factory
+  (let ((base (package-with-python2 (strip-python2-variant
+                                     python-fake-factory))))
+    (package
+      (inherit base)
+      (native-inputs
+       `(("python2-ipaddress" ,python2-ipaddress)
+         ,@(package-native-inputs base))))))
+
-- 
2.8.4

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

* Re: [PATCH 05/10] gnu: Add python-cleo and python2-cleo.
  2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
                   ` (4 preceding siblings ...)
  2016-06-23 15:20 ` [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory 宋文武
@ 2016-06-25 17:58 ` Leo Famulari
  5 siblings, 0 replies; 14+ messages in thread
From: Leo Famulari @ 2016-06-25 17:58 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

On Thu, Jun 23, 2016 at 11:19:59PM +0800, 宋文武 wrote:
> * gnu/packages/python.scm (python-cleo, python2-cleo): New variables.
> ---
>  gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 1dc5212..d1d127b 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -9391,3 +9391,31 @@ Wikipedia code samples at
>  (define-public python2-pylev
>    (package-with-python2 python-pylev))
>  
> +(define-public python-cleo
> +  (package
> +    (name "python-cleo")
> +    (version "0.4.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "cleo" version))
> +              (sha256
> +               (base32
> +                "1k2dcl6mqpn5bljyl6w42rqyd9mb3y9kh2mg7m2x3kfjwvg0rpva"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("python-psutil" ,python-psutil)
> +       ("python-pylev" ,python-pylev)
> +       ("python-setuptools" ,python-setuptools)
> +       ;; For testing
> +       ("python-mock" ,python-mock)
> +       ("python-pytest" ,python-pytest)))
> +    (home-page "https://github.com/sdispater/cleo")
> +    (synopsis "Command-line arguments library for Python")
> +    (description
> +     "Cleo allows you to create command-line commands with signature in
> +docstring and colored output.")

How about "command-line interfaces"? Also, I don't know what "signature
in docstring" means? Is that something that Python programmers (not me)
would understand?

> +    (license license:expat)))
> +
> +(define-public python2-cleo
> +  (package-with-python2 python-cleo))
> +
> -- 
> 2.8.4
> 
> 

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

* Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.
  2016-06-23 15:20 ` [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator 宋文武
@ 2016-06-25 17:58   ` Leo Famulari
  2016-06-26  2:43     ` 宋文武
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2016-06-25 17:58 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote:
> * gnu/packages/python.scm (python-email-validator)
> (python2-email-validator): New variables.
> ---
>  gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index ff3cb99..68123cc 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS0.")
>  (define-public python2-dnspython
>    (package-with-python2 python-dnspython))
>  
> +(define-public python-email-validator
> +  (package
> +    (name "python-email-validator")
> +    (version "1.0.1")
> +    (source
> +     (origin (method url-fetch)
> +             (uri (pypi-uri "email_validator" version))
> +             (sha256
> +              (base32
> +               "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))

The indentation should be shifted to the right.

> +    (build-system python-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-before 'build 'use-dnspython
> +           (lambda _
> +             (substitute* "setup.py"
> +               (("dnspython3") "dnspython"))
> +             #t)))))
> +    (native-inputs
> +     `(("python-dnspython" ,python-dnspython)
> +       ("python-idna" ,python-idna)

Do dnspython and idna need to be native-inputs? Are they only used to
build?

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

* Re: [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory.
  2016-06-23 15:20 ` [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory 宋文武
@ 2016-06-25 17:58   ` Leo Famulari
  2016-06-26  2:09     ` 宋文武
  0 siblings, 1 reply; 14+ messages in thread
From: Leo Famulari @ 2016-06-25 17:58 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

On Thu, Jun 23, 2016 at 11:20:04PM +0800, 宋文武 wrote:
> * gnu/packages/python.scm (python-fake-factory, python2-fake-factory):
> New variables.

> +  (arguments
> +   '(#:phases
> +     (modify-phases %standard-phases
> +       (add-before 'check 'disable-failing-test
> +         ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
> +         ;;      first_name, last_name = name.split()
> +         ;; ValueError: too many values to unpack (expected 2)
> +         (lambda _
> +           (delete-file "faker/tests/ne_np/__init__.py")
> +           #t)))))

It's safe to disable this test?

> +  (native-inputs
> +   `(("python-dateutil" ,python-dateutil-2)
> +     ("python-setuptools" ,python-setuptools)
> +     ("python-six" ,python-six)
> +     ;; For testing
> +     ("python-email-validator" ,python-email-validator)
> +     ("python-mock" ,python-mock)
> +     ("python-ukpostcodeparser" ,python-ukpostcodeparser)))

It doesn't need to use dateutil, email-validator, and ukpostcodeparser
at run-time?

> +  (home-page "http://github.com/joke2k/faker")
> +  (synopsis "Python package that generates fake data")
> +  (description
> +   "Faker is a Python package that generates fake data such as names,
> +addresses, and phone numbers.")
> +  (license license:expat)
> +  (properties `((python2-variant . ,(delay python2-fake-factory))))))
> +
> +(define-public python2-fake-factory
> +  (let ((base (package-with-python2 (strip-python2-variant
> +                                     python-fake-factory))))
> +    (package
> +      (inherit base)
> +      (native-inputs
> +       `(("python2-ipaddress" ,python2-ipaddress)
> +         ,@(package-native-inputs base))))))

I have the same question for python2-ipaddress.

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

* Re: [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory.
  2016-06-25 17:58   ` Leo Famulari
@ 2016-06-26  2:09     ` 宋文武
  0 siblings, 0 replies; 14+ messages in thread
From: 宋文武 @ 2016-06-26  2:09 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Thu, Jun 23, 2016 at 11:20:04PM +0800, 宋文武 wrote:
>> * gnu/packages/python.scm (python-fake-factory, python2-fake-factory):
>> New variables.
>
>> +  (arguments
>> +   '(#:phases
>> +     (modify-phases %standard-phases
>> +       (add-before 'check 'disable-failing-test
>> +         ;; XXX: faker/tests/ne_np/__init__.py, line 40, in test_names
>> +         ;;      first_name, last_name = name.split()
>> +         ;; ValueError: too many values to unpack (expected 2)
>> +         (lambda _
>> +           (delete-file "faker/tests/ne_np/__init__.py")
>> +           #t)))))
>
> It's safe to disable this test?
Yes, the provider provides names in (first, last) or (prefix, first,
last) forms, I think the test code is just outdated.

>
>> +  (native-inputs
>> +   `(("python-dateutil" ,python-dateutil-2)
>> +     ("python-setuptools" ,python-setuptools)
>> +     ("python-six" ,python-six)
>> +     ;; For testing
>> +     ("python-email-validator" ,python-email-validator)
>> +     ("python-mock" ,python-mock)
>> +     ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
>
> It doesn't need to use dateutil, email-validator, and ukpostcodeparser
> at run-time?
It need dateutil and six at runtime, and they're included in the pth
file, I can import them in python from:
  `guix environment --ad-hoc python python-fake-factory -- python3'

IIUC, I don't need to propagate dateutil and six, right?

>
>> +  (home-page "http://github.com/joke2k/faker")
>> +  (synopsis "Python package that generates fake data")
>> +  (description
>> +   "Faker is a Python package that generates fake data such as names,
>> +addresses, and phone numbers.")
>> +  (license license:expat)
>> +  (properties `((python2-variant . ,(delay python2-fake-factory))))))
>> +
>> +(define-public python2-fake-factory
>> +  (let ((base (package-with-python2 (strip-python2-variant
>> +                                     python-fake-factory))))
>> +    (package
>> +      (inherit base)
>> +      (native-inputs
>> +       `(("python2-ipaddress" ,python2-ipaddress)
>> +         ,@(package-native-inputs base))))))
>
> I have the same question for python2-ipaddress.
Oh, it's needed and missing from PYTHONPATH, I should propagate it.

Thanks for the review!

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

* Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.
  2016-06-25 17:58   ` Leo Famulari
@ 2016-06-26  2:43     ` 宋文武
  2016-06-26 21:03       ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: 宋文武 @ 2016-06-26  2:43 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> writes:

> On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote:
>> * gnu/packages/python.scm (python-email-validator)
>> (python2-email-validator): New variables.
>> ---
>>  gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>> 
>> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
>> index ff3cb99..68123cc 100644
>> --- a/gnu/packages/python.scm
>> +++ b/gnu/packages/python.scm
>> @@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS0.")
>>  (define-public python2-dnspython
>>    (package-with-python2 python-dnspython))
>>  
>> +(define-public python-email-validator
>> +  (package
>> +    (name "python-email-validator")
>> +    (version "1.0.1")
>> +    (source
>> +     (origin (method url-fetch)
>> +             (uri (pypi-uri "email_validator" version))
>> +             (sha256
>> +              (base32
>> +               "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
>
> The indentation should be shifted to the right.
OK.

>
>> +    (build-system python-build-system)
>> +    (arguments
>> +     '(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-before 'build 'use-dnspython
>> +           (lambda _
>> +             (substitute* "setup.py"
>> +               (("dnspython3") "dnspython"))
>> +             #t)))))
>> +    (native-inputs
>> +     `(("python-dnspython" ,python-dnspython)
>> +       ("python-idna" ,python-idna)
>
> Do dnspython and idna need to be native-inputs? Are they only used to
> build?
They're needed at runtime, and included in the pth file.
But I'm not sure whether or not inputs for python should be
native-inputs, I never cross build python modules for other
architertures.

Should I put dnspython and idna into inputs, or propagated-inputs?

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

* Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.
  2016-06-26  2:43     ` 宋文武
@ 2016-06-26 21:03       ` Ludovic Courtès
  2016-06-27 14:22         ` 宋文武
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2016-06-26 21:03 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

iyzsong@member.fsf.org (宋文武) skribis:

> Leo Famulari <leo@famulari.name> writes:
>
>> On Thu, Jun 23, 2016 at 11:20:02PM +0800, 宋文武 wrote:
>>> * gnu/packages/python.scm (python-email-validator)
>>> (python2-email-validator): New variables.
>>> ---
>>>  gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>> 
>>> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
>>> index ff3cb99..68123cc 100644
>>> --- a/gnu/packages/python.scm
>>> +++ b/gnu/packages/python.scm
>>> @@ -9468,3 +9468,35 @@ It supports TSIG authenticated messages and EDNS0.")
>>>  (define-public python2-dnspython
>>>    (package-with-python2 python-dnspython))
>>>  
>>> +(define-public python-email-validator
>>> +  (package
>>> +    (name "python-email-validator")
>>> +    (version "1.0.1")
>>> +    (source
>>> +     (origin (method url-fetch)
>>> +             (uri (pypi-uri "email_validator" version))
>>> +             (sha256
>>> +              (base32
>>> +               "0mn8jg5h8ifl8w6a6m0hq8kbk0mzw9vm054qfamkn89b3npz52qw"))))
>>
>> The indentation should be shifted to the right.
> OK.
>
>>
>>> +    (build-system python-build-system)
>>> +    (arguments
>>> +     '(#:phases
>>> +       (modify-phases %standard-phases
>>> +         (add-before 'build 'use-dnspython
>>> +           (lambda _
>>> +             (substitute* "setup.py"
>>> +               (("dnspython3") "dnspython"))
>>> +             #t)))))
>>> +    (native-inputs
>>> +     `(("python-dnspython" ,python-dnspython)
>>> +       ("python-idna" ,python-idna)
>>
>> Do dnspython and idna need to be native-inputs? Are they only used to
>> build?
> They're needed at runtime, and included in the pth file.
> But I'm not sure whether or not inputs for python should be
> native-inputs, I never cross build python modules for other
> architertures.

If they’re used at run time, they’re not ‘native-inputs’.  (In practice
we cannot cross-compile Python stuff currently, so this is largely a
theoretical concern, but it doesn’t cost much to get it right.)

> Should I put dnspython and idna into inputs, or propagated-inputs?

If the installed code “import”s them, then they should be propagated.

Ludo’.

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

* Re: [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator.
  2016-06-26 21:03       ` Ludovic Courtès
@ 2016-06-27 14:22         ` 宋文武
  2016-06-28 12:28           ` Python and propagated inputs Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: 宋文武 @ 2016-06-27 14:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

>> They're needed at runtime, and included in the pth file.
>> But I'm not sure whether or not inputs for python should be
>> native-inputs, I never cross build python modules for other
>> architertures.
>
> If they’re used at run time, they’re not ‘native-inputs’.  (In practice
> we cannot cross-compile Python stuff currently, so this is largely a
> theoretical concern, but it doesn’t cost much to get it right.)
>
>> Should I put dnspython and idna into inputs, or propagated-inputs?
>
> If the installed code “import”s them, then they should be propagated.
OK, done.  I'm fine with propagated them, but there are many python
packages use inputs for runtime depends and rely on the pth file too.

What's the current practice?


Also, last dicussed at:
<https://lists.gnu.org/archive/html/guix-devel/2016-04/msg01020.html>

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

* Python and propagated inputs
  2016-06-27 14:22         ` 宋文武
@ 2016-06-28 12:28           ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2016-06-28 12:28 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

iyzsong@member.fsf.org (宋文武) skribis:

>>> They're needed at runtime, and included in the pth file.
>>> But I'm not sure whether or not inputs for python should be
>>> native-inputs, I never cross build python modules for other
>>> architertures.
>>
>> If they’re used at run time, they’re not ‘native-inputs’.  (In practice
>> we cannot cross-compile Python stuff currently, so this is largely a
>> theoretical concern, but it doesn’t cost much to get it right.)
>>
>>> Should I put dnspython and idna into inputs, or propagated-inputs?
>>
>> If the installed code “import”s them, then they should be propagated.
> OK, done.  I'm fine with propagated them, but there are many python
> packages use inputs for runtime depends and rely on the pth file too.
>
> What's the current practice?
>
>
> Also, last dicussed at:
> <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg01020.html>

AIUI, what Ricardo is saying in this message is that current practice is
to propagate inputs that are needed at run time, even though that sucks
in some ways.

Ludo’.

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

end of thread, other threads:[~2016-06-28 12:28 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 15:19 [PATCH 05/10] gnu: Add python-cleo and python2-cleo 宋文武
2016-06-23 15:20 ` [PATCH 06/10] gnu: Add python-lazy-object-proxy and python2-lazy-object-proxy 宋文武
2016-06-23 15:20 ` [PATCH 07/10] gnu: Add python-dnspython and python2-dnspython 宋文武
2016-06-23 15:20 ` [PATCH 08/10] gnu: Add python-email-validator and python2-email-validator 宋文武
2016-06-25 17:58   ` Leo Famulari
2016-06-26  2:43     ` 宋文武
2016-06-26 21:03       ` Ludovic Courtès
2016-06-27 14:22         ` 宋文武
2016-06-28 12:28           ` Python and propagated inputs Ludovic Courtès
2016-06-23 15:20 ` [PATCH 09/10] gnu: Add python-ukpostcodeparser and python2-ukpostcodeparser 宋文武
2016-06-23 15:20 ` [PATCH 10/10] gnu: Add python-fake-factory and python2-fake-factory 宋文武
2016-06-25 17:58   ` Leo Famulari
2016-06-26  2:09     ` 宋文武
2016-06-25 17:58 ` [PATCH 05/10] gnu: Add python-cleo and python2-cleo Leo Famulari

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