GNU bug report logs - #22808
Add a function to simplify many of the new python2-foo definitions

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Christopher Allan Webber <cwebber@HIDDEN>; Keywords: patch; dated Thu, 25 Feb 2016 21:15:02 UTC; Maintainer for guix is bug-guix@HIDDEN.
Added tag(s) patch. Request was from ludo@HIDDEN (Ludovic Courtès) to control <at> debbugs.gnu.org. Full text available.

Message received at 22808 <at> debbugs.gnu.org:


Received: (at 22808) by debbugs.gnu.org; 26 Apr 2016 09:54:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 26 05:54:43 2016
Received: from localhost ([127.0.0.1]:47478 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1auzhb-0005LU-5d
	for submit <at> debbugs.gnu.org; Tue, 26 Apr 2016 05:54:43 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50101)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1auzhZ-0005LK-74
 for 22808 <at> debbugs.gnu.org; Tue, 26 Apr 2016 05:54:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1auzhP-0002aF-FP
 for 22808 <at> debbugs.gnu.org; Tue, 26 Apr 2016 05:54:35 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45523)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1auzhP-0002aB-BG; Tue, 26 Apr 2016 05:54:31 -0400
Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:37086 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1auzhO-0000fV-Jp; Tue, 26 Apr 2016 05:54:31 -0400
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Christopher Allan Webber <cwebber@HIDDEN>
Subject: Re: bug#22808: Add a function to simplify many of the new python2-foo
 definitions
References: <87vb5cebm6.fsf@HIDDEN> <8760xbyrxd.fsf@HIDDEN>
Date: Tue, 26 Apr 2016 11:54:28 +0200
In-Reply-To: <8760xbyrxd.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Sat, 27 Feb 2016 00:26:22 +0100")
Message-ID: <87lh40wv8r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -4.4 (----)
X-Debbugs-Envelope-To: 22808
Cc: 22808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.4 (----)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

ludo@HIDDEN (Ludovic Court=C3=A8s) skribis:

> Christopher Allan Webber <cwebber@HIDDEN> skribis:
>
>> Right now we have a lot of these that look very similar:
>>
>>   (define-public python2-chardet
>>     (package
>>       (inherit (package-with-python2
>>                 (strip-python2-variant python-chardet)))
>>       (native-inputs `(("python2-setuptools" ,python2-setuptools)))))
>
> Right, we discussed before adding the python2-setuptools dependency
> automatically as part of =E2=80=98package-with-python2=E2=80=99.  I think=
 this would be
> a good idea, indeed.

What about this:


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -345,6 +345,14 @@ instead of @command{python3}.")))
 (define-public python-wrapper (wrap-python3 python))
 (define-public python-minimal-wrapper (wrap-python3 python-minimal))
 
+(define (package-with-python2+setuptools p)
+  (let ((base (package-with-python2 (strip-python2-variant p))))
+    (package
+      (inherit base)
+      (native-inputs `(("python2-setuptools" ,python2-setuptools)
+                       ,@(package-native-inputs base))))))
+
+
 (define-public python-psutil
   (package
     (name "python-psutil")

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Then we need to change all the occurrences of this pattern to use this
new procedure.

Thoughts?

Ludo=E2=80=99.

--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#22808; Package guix. Full text available.

Message received at 22808 <at> debbugs.gnu.org:


Received: (at 22808) by debbugs.gnu.org; 26 Feb 2016 23:26:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 26 18:26:37 2016
Received: from localhost ([127.0.0.1]:47976 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aZRmP-0002ZZ-M0
	for submit <at> debbugs.gnu.org; Fri, 26 Feb 2016 18:26:37 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49580)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <ludo@HIDDEN>) id 1aZRmO-0002ZN-7W
 for 22808 <at> debbugs.gnu.org; Fri, 26 Feb 2016 18:26:36 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ludo@HIDDEN>) id 1aZRmE-0003Lf-5J
 for 22808 <at> debbugs.gnu.org; Fri, 26 Feb 2016 18:26:31 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60206)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1aZRmE-0003Lb-1y; Fri, 26 Feb 2016 18:26:26 -0500
Received: from reverse-83.fdn.fr ([80.67.176.83]:57936 helo=pluto)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1aZRmC-00020z-IK; Fri, 26 Feb 2016 18:26:25 -0500
From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=)
To: Christopher Allan Webber <cwebber@HIDDEN>
Subject: Re: bug#22808: Add a function to simplify many of the new python2-foo
 definitions
References: <87vb5cebm6.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 9 =?utf-8?Q?Vent=C3=B4se?= an 224 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x3D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-unknown-linux-gnu
Date: Sat, 27 Feb 2016 00:26:22 +0100
In-Reply-To: <87vb5cebm6.fsf@HIDDEN> (Christopher Allan Webber's
 message of "Thu, 25 Feb 2016 13:14:25 -0800")
Message-ID: <8760xbyrxd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 22808
Cc: 22808 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Christopher Allan Webber <cwebber@HIDDEN> skribis:

> Right now we have a lot of these that look very similar:
>
>   (define-public python2-chardet
>     (package
>       (inherit (package-with-python2
>                 (strip-python2-variant python-chardet)))
>       (native-inputs `(("python2-setuptools" ,python2-setuptools)))))

Right, we discussed before adding the python2-setuptools dependency
automatically as part of =E2=80=98package-with-python2=E2=80=99.  I think t=
his would be
a good idea, indeed.

We need to see if there are exceptions to this rule.

Any takers?  :-)

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#22808; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Feb 2016 21:14:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 25 16:14:41 2016
Received: from localhost ([127.0.0.1]:46414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aZ3FB-0005Py-1a
	for submit <at> debbugs.gnu.org; Thu, 25 Feb 2016 16:14:41 -0500
Received: from eggs.gnu.org ([208.118.235.92]:47252)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <cwebber@HIDDEN>) id 1aZ3F9-0005Pm-6i
 for submit <at> debbugs.gnu.org; Thu, 25 Feb 2016 16:14:39 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cwebber@HIDDEN>) id 1aZ3F3-00048w-Ai
 for submit <at> debbugs.gnu.org; Thu, 25 Feb 2016 16:14:33 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58940)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <cwebber@HIDDEN>) id 1aZ3F3-00048p-7X
 for submit <at> debbugs.gnu.org; Thu, 25 Feb 2016 16:14:33 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38211)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <cwebber@HIDDEN>) id 1aZ3F2-0003kO-Bx
 for bug-guix@HIDDEN; Thu, 25 Feb 2016 16:14:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <cwebber@HIDDEN>) id 1aZ3Ey-00047n-0o
 for bug-guix@HIDDEN; Thu, 25 Feb 2016 16:14:32 -0500
Received: from dustycloud.org ([50.116.34.160]:56622)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <cwebber@HIDDEN>) id 1aZ3Ex-00047b-SK
 for bug-guix@HIDDEN; Thu, 25 Feb 2016 16:14:27 -0500
Received: from oolong (localhost [127.0.0.1])
 by dustycloud.org (Postfix) with ESMTPS id 978A42661D
 for <bug-guix@HIDDEN>; Thu, 25 Feb 2016 16:14:25 -0500 (EST)
User-agent: mu4e 0.9.13; emacs 24.5.1
From: Christopher Allan Webber <cwebber@HIDDEN>
To: bug-guix@HIDDEN
Subject: Add a function to simplify many of the new python2-foo definitions
Date: Thu, 25 Feb 2016 13:14:25 -0800
Message-ID: <87vb5cebm6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

Right now we have a lot of these that look very similar:

  (define-public python2-chardet
    (package
      (inherit (package-with-python2
                (strip-python2-variant python-chardet)))
      (native-inputs `(("python2-setuptools" ,python2-setuptools)))))

  (define-public python2-translitcodec
    (package
      (inherit (package-with-python2
                (strip-python2-variant python-translitcodec)))
      (native-inputs `(("python2-setuptools" ,python2-setuptools)))))

  (define-public python2-celery
    (let ((celery (package-with-python2
                   (strip-python2-variant python-celery))))
      (package
        (inherit celery)
        (native-inputs `(("python2-setuptools" ,python2-setuptools)
                         ("python2-unittest2" ,python2-unittest2)
                         ("python2-mock" ,python2-mock)
                         ,@(package-native-inputs celery))))))

Time for an abstraction?




Acknowledgement sent to Christopher Allan Webber <cwebber@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#22808; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 26 Apr 2016 10:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.