Patchwork [v2,4/4] gnu: python2-flask: Pick up python-flask's native-inputs.

login
register
mail settings
Submitter Danny Milosavljevic
Date Nov. 27, 2016, 8:53 a.m.
Message ID <20161127085320.22589-5-dannym@scratchpost.org>
Download mbox | patch
Permalink /patch/17977/
State New
Headers show

Comments

Danny Milosavljevic - Nov. 27, 2016, 8:53 a.m.
* gnu/packages/python.scm (python2-flask)[native-inputs]:
  Pick up python-flask's native-inputs.
---
 gnu/packages/python.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Efraim Flashner - Dec. 3, 2016, 8:38 p.m.
On Sun, Nov 27, 2016 at 09:53:20AM +0100, Danny Milosavljevic wrote:
> * gnu/packages/python.scm (python2-flask)[native-inputs]:
>   Pick up python-flask's native-inputs.
> ---
>  gnu/packages/python.scm | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 497da52..39b40e7 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -9581,9 +9581,11 @@ presume or force a developer to use a particular tool or library.")
>      (properties `((python2-variant . ,(delay python2-flask))))))
>  
>  (define-public python2-flask
> -  (package (inherit (package-with-python2
> -                     (strip-python2-variant python-flask)))
> -    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
> +  (let ((base (package-with-python2 (strip-python2-variant python-flask))))
> +    (package
> +      (inherit base)
> +      (native-inputs `(("python2-setuptools" ,python2-setuptools)
> +                       ,@(package-native-inputs base))))))
>  
>  (define-public python-cookies
>    (package
> 

This patch can be included with the previous one, since python- and
python2- are essentially two parts of the same package.
Hartmut Goebel - Dec. 4, 2016, 8 p.m.
Am 03.12.2016 um 21:38 schrieb Efraim Flashner:
> > +      (native-inputs `(("python2-setuptools" ,python2-setuptools)
> > +                       ,@(package-native-inputs base))))))
> >  

There is no need for adding setuptools here. It is now included in our
base python installation, even for Python 2. There is no need for adding
it here.

guix lint should tell you so :-)

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 497da52..39b40e7 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -9581,9 +9581,11 @@  presume or force a developer to use a particular tool or library.")
     (properties `((python2-variant . ,(delay python2-flask))))))
 
 (define-public python2-flask
-  (package (inherit (package-with-python2
-                     (strip-python2-variant python-flask)))
-    (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
+  (let ((base (package-with-python2 (strip-python2-variant python-flask))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
 
 (define-public python-cookies
   (package