From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22808: Add a function to simplify many of the new python2-foo definitions Date: Tue, 26 Apr 2016 11:54:28 +0200 Message-ID: <87lh40wv8r.fsf@gnu.org> References: <87vb5cebm6.fsf@dustycloud.org> <8760xbyrxd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auzhz-0000th-5t for bug-guix@gnu.org; Tue, 26 Apr 2016 05:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auzhu-0002gG-MV for bug-guix@gnu.org; Tue, 26 Apr 2016 05:55:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auzhu-0002gC-J5 for bug-guix@gnu.org; Tue, 26 Apr 2016 05:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1auzhu-0005ML-BU for bug-guix@gnu.org; Tue, 26 Apr 2016 05:55:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <8760xbyrxd.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Sat, 27 Feb 2016 00:26:22 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Christopher Allan Webber Cc: 22808@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Christopher Allan Webber 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. --=-=-=--