From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: bug#22808: Add a function to simplify many of the new python2-foo definitions Date: Tue, 26 Apr 2016 15:44:28 +0300 Message-ID: <20160426124428.GA12637@debian-netbook> References: <87vb5cebm6.fsf@dustycloud.org> <8760xbyrxd.fsf@gnu.org> <87lh40wv8r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Dxnq1zWXvFF0Q93v" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av2MV-00035W-C2 for bug-guix@gnu.org; Tue, 26 Apr 2016 08:45:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1av2MQ-0003AL-Ls for bug-guix@gnu.org; Tue, 26 Apr 2016 08:45:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:35235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1av2MQ-0003AG-JD for bug-guix@gnu.org; Tue, 26 Apr 2016 08:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1av2MQ-0004Qj-59 for bug-guix@gnu.org; Tue, 26 Apr 2016 08:45:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87lh40wv8r.fsf@gnu.org> 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 22808@debbugs.gnu.org --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 26, 2016 at 11:54:28AM +0200, Ludovic Court=C3=A8s wrote: > ludo@gnu.org (Ludovic Court=C3=A8s) skribis: >=20 > > 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 thi= nk this would be > > a good idea, indeed. >=20 > What about this: >=20 > --- 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)) > =20 > +(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)))))) > + > +=0C > (define-public python-psutil > (package > (name "python-psutil") >=20 > Then we need to change all the occurrences of this pattern to use this > new procedure. >=20 > Thoughts? >=20 > Ludo=E2=80=99. Would we still need the properties field in python-foo? What would this mean for packages that need python2-setuptools and other python2- specific packages? Specifically, would all the calls to package-native-inputs cause a slowdown in computing the package? --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXH2KpAAoJEPTB05F+rO6T8agP/ixI27Wjdg50tniOsEpWT3CM uZUo7LZ5JYRTXXk/mYTKo16DXwvNssr+BiQBs7D68J1a59lff24/HZ0fUWc3bdzz 71UG+TFMvqKPEbxbCjWAcBjedL3j9TMxQuI5lFZ4nAs/nBm/2fZGG+2WQt4wZrKa t+Mgue/Wg4udP/6CUZQVc0j3ieB7oOvYiMSC0fMLDiDZ1nnDjf3WkJzUc18VYKjE dmzTS73AX7FeOPcvWet0dsz7JCn3e5ycJJHoF4OcR1yHoz28XI+fViuQWlv3VkIL JLXTxu9HblmpjRGCCU5cfR7AIta0BgVaOmVzRmTRrRpRp+/Y0beGzcxYh2ZTZ1C3 d0iQz1oIPDpTb44OXvxmex36yLq0bWbA+icOrBuSUpTxMSyUqSGRsV0IIQtqJW/7 RSBhkQSU9acxAPrRG6Cam47VjrjX3Z+xzOqbifxg/iIiWCwIEOMvYdbrzcqlAzc1 Y+7Zua4zcIhL2YGSPUguzH505TstmgzCYlL8YDZn54aGsHKVqVjLpNG2+x2TUbmw 5czMpuiwQtFPTKeomIMuoWpmkOo7hUjr6XxJFBg3RhVqRsmYo+9WHnl5HpyUKRje cpliBsbkWYr0JLYRQ6/CVuezdysl8jqkHLIsZ1kfmcthHes7uq6k5ReTwsFsDn4A cbQkajpq3rhgs24czN8V =4zh4 -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v--