diff mbox

Add python-pythondialog

Message ID 20160802202103.GA4061@jasmine
State New
Headers show

Commit Message

Leo Famulari Aug. 2, 2016, 8:21 p.m. UTC
On Thu, Jul 28, 2016 at 12:53:15PM +0200, Vincent Legoll wrote:
> And actually the patch is wrong, I think it's missing a closing paren
> for python2-pythondialog...

I re-wrote it using the 'python2-variant' system, as attached. Does it
work for you?

I'm not sure if that's the right approach, but the resulting package for
python2-pythondialog has the same result as before. What I mean is that
I was able to download a substitute from Hydra for it, even with this
new package definition.

Also, I noticed that the Python 3 and Python 2 versions of this software
tend to be released concurrently, so I made the Python 2 package take
the version of the Python 3 package. Do you think that will work?

Comments

non such Aug. 4, 2016, 8:16 a.m. UTC | #1
Leo Famulari <leo@famulari.name> writes:

> On Thu, Jul 28, 2016 at 12:53:15PM +0200, Vincent Legoll wrote:
>> And actually the patch is wrong, I think it's missing a closing paren
>> for python2-pythondialog...
>
> I re-wrote it using the 'python2-variant' system, as attached. Does it
> work for you?
>
> I'm not sure if that's the right approach, but the resulting package for
> python2-pythondialog has the same result as before. What I mean is that
> I was able to download a substitute from Hydra for it, even with this
> new package definition.
>
> Also, I noticed that the Python 3 and Python 2 versions of this software
> tend to be released concurrently, so I made the Python 2 package take
> the version of the Python 3 package. Do you think that will work?

Maybe.. I have no reference why I needed this in the first
place. PyBitmessage dependeny? I would say it works for me, but I don't
know exactly what the problem was outside of this thread.

> From 50412a737f4e11f0c191fac3f755bab798da2846 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Tue, 2 Aug 2016 16:16:45 -0400
> Subject: [PATCH] gnu: Add python-pythondialog.
>
> * gnu/packages/python.scm (python-pythondialog): New variable.
> (python2-pythondialog): Inherit from PYTHON-PYTHONDIALOG.
>
> Co-authored-by: Vincent Legoll <vincent.legoll@idgrilles.fr>
> ---
>  gnu/packages/python.scm | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index 5ba92b2..f1aa5b4 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -6680,17 +6680,17 @@ facilities for defining, registering and looking up components.")
>  (define-public python2-zope-component
>    (package-with-python2 python-zope-component))
>  
> -(define-public python2-pythondialog
> +(define-public python-pythondialog
>    (package
> -    (name "python2-pythondialog")
> +    (name "python-pythondialog")
>      (version "3.4.0")
>      (source
>       (origin
>         (method url-fetch)
> -       (uri (pypi-uri "python2-pythondialog" version))
> +       (uri (pypi-uri "pythondialog" version))
>         (sha256
>          (base32
> -         "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9"))))
> +         "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
>      (build-system python-build-system)
>      (arguments
>       `(#:phases
> @@ -6704,7 +6704,6 @@ facilities for defining, registering and looking up components.")
>                   (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
>                    (string-append "os.getenv(\"PATH\")  + \":" dialog "/bin\"")))
>                 #t))))
> -       #:python ,python-2
>         #:tests? #f)) ; no test suite
>      (propagated-inputs
>       `(("dialog" ,dialog)))
> @@ -6713,7 +6712,20 @@ facilities for defining, registering and looking up components.")
>      (description "A Python wrapper for the dialog utility.  Its purpose is to
>  provide an easy to use, pythonic and comprehensive Python interface to dialog.
>  This allows one to make simple text-mode user interfaces on Unix-like systems")
> -    (license lgpl2.1)))
> +    (license lgpl2.1)
> +    (properties `((python2-variant . ,(delay python2-pythondialog))))))
> +
> +(define-public python2-pythondialog
> +  (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
> +    (package
> +      (inherit base)
> +      (version (package-version python-pythondialog))
> +      (source (origin
> +                (method url-fetch)
> +                (uri (pypi-uri "python2-pythondialog" version))
> +                (sha256
> +                 (base32
> +                  "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
>  
>  (define-public python-pyrfc3339
>    (package
> -- 
> 2.9.2
>
Leo Famulari Aug. 7, 2016, 2:56 a.m. UTC | #2
On Thu, Aug 04, 2016 at 08:16:42AM +0000, ng0 wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Thu, Jul 28, 2016 at 12:53:15PM +0200, Vincent Legoll wrote:
> >> And actually the patch is wrong, I think it's missing a closing paren
> >> for python2-pythondialog...
> >
> > I re-wrote it using the 'python2-variant' system, as attached. Does it
> > work for you?
> >
> > I'm not sure if that's the right approach, but the resulting package for
> > python2-pythondialog has the same result as before. What I mean is that
> > I was able to download a substitute from Hydra for it, even with this
> > new package definition.
> >
> > Also, I noticed that the Python 3 and Python 2 versions of this software
> > tend to be released concurrently, so I made the Python 2 package take
> > the version of the Python 3 package. Do you think that will work?
> 
> Maybe.. I have no reference why I needed this in the first
> place. PyBitmessage dependeny? I would say it works for me, but I don't
> know exactly what the problem was outside of this thread.

Okay, well I just pushed it as 1ae44b802 :) So we have it if we need it.
diff mbox

Patch

From 50412a737f4e11f0c191fac3f755bab798da2846 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Tue, 2 Aug 2016 16:16:45 -0400
Subject: [PATCH] gnu: Add python-pythondialog.

* gnu/packages/python.scm (python-pythondialog): New variable.
(python2-pythondialog): Inherit from PYTHON-PYTHONDIALOG.

Co-authored-by: Vincent Legoll <vincent.legoll@idgrilles.fr>
---
 gnu/packages/python.scm | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5ba92b2..f1aa5b4 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6680,17 +6680,17 @@  facilities for defining, registering and looking up components.")
 (define-public python2-zope-component
   (package-with-python2 python-zope-component))
 
-(define-public python2-pythondialog
+(define-public python-pythondialog
   (package
-    (name "python2-pythondialog")
+    (name "python-pythondialog")
     (version "3.4.0")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "python2-pythondialog" version))
+       (uri (pypi-uri "pythondialog" version))
        (sha256
         (base32
-         "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9"))))
+         "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -6704,7 +6704,6 @@  facilities for defining, registering and looking up components.")
                  (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
                   (string-append "os.getenv(\"PATH\")  + \":" dialog "/bin\"")))
                #t))))
-       #:python ,python-2
        #:tests? #f)) ; no test suite
     (propagated-inputs
      `(("dialog" ,dialog)))
@@ -6713,7 +6712,20 @@  facilities for defining, registering and looking up components.")
     (description "A Python wrapper for the dialog utility.  Its purpose is to
 provide an easy to use, pythonic and comprehensive Python interface to dialog.
 This allows one to make simple text-mode user interfaces on Unix-like systems")
-    (license lgpl2.1)))
+    (license lgpl2.1)
+    (properties `((python2-variant . ,(delay python2-pythondialog))))))
+
+(define-public python2-pythondialog
+  (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
+    (package
+      (inherit base)
+      (version (package-version python-pythondialog))
+      (source (origin
+                (method url-fetch)
+                (uri (pypi-uri "python2-pythondialog" version))
+                (sha256
+                 (base32
+                  "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
 
 (define-public python-pyrfc3339
   (package
-- 
2.9.2