diff mbox

[2/5] import: pypi: Remove setuptools from the inputs.

Message ID 1468682605-12622-3-git-send-email-tipecaml@gmail.com
State New
Headers show

Commit Message

Cyril Roelandt July 16, 2016, 3:23 p.m. UTC
* guix/import/pypi.scm (compute-inputs): remove python-setuptools from the
inputs.
* tests/pypi.scm ("pypi->guix-package", "pypi->guix-package, wheels"): Update
accordingly.
---
 guix/import/pypi.scm | 7 +++----
 tests/pypi.scm       | 6 ++----
 2 files changed, 5 insertions(+), 8 deletions(-)

Comments

Ludovic Courtès July 22, 2016, 9:24 p.m. UTC | #1
Cyril Roelandt <tipecaml@gmail.com> skribis:

> * guix/import/pypi.scm (compute-inputs): remove python-setuptools from the
> inputs.
> * tests/pypi.scm ("pypi->guix-package", "pypi->guix-package, wheels"): Update
> accordingly.

IIRC python-setuptools is needed for Python 2.x only, right?  I keep
forgetting what the deal is.

Ludo’.
Leo Famulari July 22, 2016, 9:43 p.m. UTC | #2
On Fri, Jul 22, 2016 at 11:24:52PM +0200, Ludovic Courtès wrote:
> Cyril Roelandt <tipecaml@gmail.com> skribis:
> 
> > * guix/import/pypi.scm (compute-inputs): remove python-setuptools from the
> > inputs.
> > * tests/pypi.scm ("pypi->guix-package", "pypi->guix-package, wheels"): Update
> > accordingly.
> 
> IIRC python-setuptools is needed for Python 2.x only, right?  I keep
> forgetting what the deal is.

In my experience, it is more often required for Python 2.x, but
sometimes it is required by Python 3.x packages, and sometimes not for
Python 2.x packages.

I'd be happy to get a more systematic explanation, or to be shown wrong.
A simple rule would be great :)
Cyril Roelandt July 23, 2016, 2:46 p.m. UTC | #3
On 07/22/2016 11:43 PM, Leo Famulari wrote:
> In my experience, it is more often required for Python 2.x, but
> sometimes it is required by Python 3.x packages, and sometimes not for
> Python 2.x packages.
> 
> I'd be happy to get a more systematic explanation, or to be shown wrong.
> A simple rule would be great :)
> 

Yes, we usually do not need to include python-setuptools in the native
inputs of our Python 3 packages, we just add it to the Python 2 version.

Cyril.
Ludovic Courtès July 25, 2016, 9:07 p.m. UTC | #4
Cyril Roelandt <tipecaml@gmail.com> skribis:

> On 07/22/2016 11:43 PM, Leo Famulari wrote:
>> In my experience, it is more often required for Python 2.x, but
>> sometimes it is required by Python 3.x packages, and sometimes not for
>> Python 2.x packages.
>> 
>> I'd be happy to get a more systematic explanation, or to be shown wrong.
>> A simple rule would be great :)
>> 
>
> Yes, we usually do not need to include python-setuptools in the native
> inputs of our Python 3 packages, we just add it to the Python 2 version.

OK, thanks for explaining.  This patch looks good!

Ludo’.
diff mbox

Patch

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 474974b..af9b108 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -232,10 +232,9 @@  name/variable pairs describing the required inputs of this package."
   (sort
     (map (lambda (input)
            (list input (list 'unquote (string->symbol input))))
-         (append '("python-setuptools")
-                 ;; Argparse has been part of Python since 2.7.
-                 (remove (cut string=? "python-argparse" <>)
-                         (guess-requirements source-url wheel-url tarball))))
+         ;; Argparse has been part of Python since 2.7.
+         (remove (cut string=? "python-argparse" <>)
+                 (guess-requirements source-url wheel-url tarball)))
     (lambda args
       (match args
         (((a _ ...) (b _ ...))
diff --git a/tests/pypi.scm b/tests/pypi.scm
index ef43d50..7f0ad23 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -109,8 +109,7 @@  baz > 13.37")
          ('propagated-inputs
           ('quasiquote
            (("python-bar" ('unquote 'python-bar))
-            ("python-baz" ('unquote 'python-baz))
-            ("python-setuptools" ('unquote 'python-setuptools)))))
+            ("python-baz" ('unquote 'python-baz)))))
          ('home-page "http://example.com")
          ('synopsis "summary")
          ('description "summary")
@@ -169,8 +168,7 @@  baz > 13.37")
          ('propagated-inputs
           ('quasiquote
            (("python-bar" ('unquote 'python-bar))
-            ("python-baz" ('unquote 'python-baz))
-            ("python-setuptools" ('unquote 'python-setuptools)))))
+            ("python-baz" ('unquote 'python-baz)))))
          ('home-page "http://example.com")
          ('synopsis "summary")
          ('description "summary")