Patchwork Add python-pythondialog

login
register
mail settings
Submitter non such
Date July 4, 2016, 5:05 p.m.
Message ID <87lh1hcp18.fsf@we.make.ritual.n0.is>
Download mbox | patch
Permalink /patch/13625/
State New
Headers show

Comments

non such - July 4, 2016, 5:05 p.m.
From 7439588d56d9c6935a4f88b46bc3b77a9f57565e Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Mon, 4 Jul 2016 16:53:06 +0000
Subject: [PATCH] gnu: Add python-pythondialog.

* gnu/packages/python.scm (python-pythondialog): New variable.
---
 gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
Leo Famulari - July 4, 2016, 6:05 p.m.
On Mon, Jul 04, 2016 at 05:05:07PM +0000, ng0 wrote:
> * gnu/packages/python.scm (python-pythondialog): New variable.

For those reading along, python2-pythondialog and python-pythondialog
are separate implementations with different source tarballs.  They are
maintained by the same group.

But, the package definitions are basically the same. The only
differences are the name, the source and Python version.

Should one of them inherit from the other, or should we maintain two
independent package definitions?
non such - July 4, 2016, 6:28 p.m.
Leo Famulari writes:

> On Mon, Jul 04, 2016 at 05:05:07PM +0000, ng0 wrote:
>> * gnu/packages/python.scm (python-pythondialog): New variable.
>
> For those reading along, python2-pythondialog and python-pythondialog
> are separate implementations with different source tarballs.  They are
> maintained by the same group.
>
> But, the package definitions are basically the same. The only
> differences are the name, the source and Python version.
>
> Should one of them inherit from the other, or should we maintain two
> independent package definitions?

If we inherit, we should let python2- inherit from python3.

I was not sure about the right way to process with this, so it
ended up in 2 packages.
non such - July 27, 2016, 11:37 a.m.
Hi,

ng0 <ng0@we.make.ritual.n0.is> writes:

> Leo Famulari writes:
>
>> On Mon, Jul 04, 2016 at 05:05:07PM +0000, ng0 wrote:
>>> * gnu/packages/python.scm (python-pythondialog): New variable.
>>
>> For those reading along, python2-pythondialog and python-pythondialog
>> are separate implementations with different source tarballs.  They are
>> maintained by the same group.
>>
>> But, the package definitions are basically the same. The only
>> differences are the name, the source and Python version.
>>
>> Should one of them inherit from the other, or should we maintain two
>> independent package definitions?
>
> If we inherit, we should let python2- inherit from python3.
>
> I was not sure about the right way to process with this, so it
> ended up in 2 packages.

There has been no update on this for 3 weeks.
Could someone look into this and reply?


Thanks.
Ben Woodcroft - July 27, 2016, 12:17 p.m.
Hi there,

On 27/07/16 21:37, ng0 wrote:
> Hi,
>
> ng0 <ng0@we.make.ritual.n0.is> writes:
>
>> Leo Famulari writes:
>>
>>> On Mon, Jul 04, 2016 at 05:05:07PM +0000, ng0 wrote:
>>>> * gnu/packages/python.scm (python-pythondialog): New variable.
>>> For those reading along, python2-pythondialog and python-pythondialog
>>> are separate implementations with different source tarballs.  They are
>>> maintained by the same group.
>>>
>>> But, the package definitions are basically the same. The only
>>> differences are the name, the source and Python version.
>>>
>>> Should one of them inherit from the other, or should we maintain two
>>> independent package definitions?
>> If we inherit, we should let python2- inherit from python3.
>>
>> I was not sure about the right way to process with this, so it
>> ended up in 2 packages.
> There has been no update on this for 3 weeks.
> Could someone look into this and reply?

IMHO python2-pythondialog should inherit from python-dialog as you suggest.

Apologies for the slow review. Would you mind preparing another patch 
please?
Thanks,
ben

Patch

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index a85817d..bd4ce04 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6699,6 +6699,41 @@  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)))
 
+(define-public python-pythondialog
+  (package
+    (name "python-pythondialog")
+    (version "3.4.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pythondialog" version))
+       (sha256
+        (base32
+         "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((dialog (assoc-ref inputs "dialog")))
+               ;; Since this library really wants to grovel the search path, we
+               ;; must hardcode dialog's store path into it.
+               (substitute* "dialog.py"
+                 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
+                  (string-append "os.getenv(\"PATH\")  + \":" dialog "/bin\"")))
+               #t))))
+       #:tests? #f)) ; no test suite
+    (propagated-inputs
+     `(("dialog" ,dialog)))
+    (home-page
+     "http://pythondialog.sourceforge.net/")
+    (synopsis
+     "A Python interface to the UNIX dialog utility and mostly-compatible programs")
+    (description
+     "A Python interface to the UNIX dialog utility and mostly-compatible programs")
+    (license lgpl2.1)))
+
 (define-public python-pyrfc3339
   (package
     (name "python-pyrfc3339")