From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: Fixing package-with-python2 Date: Tue, 2 Feb 2016 09:50:44 +0200 Message-ID: <20160202095044.0f7c8af4@debian-netbook> References: <87vb68nkyb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/YdEI1j1an9v.doB2HDa88aQ"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQVjl-0002NW-B1 for guix-devel@gnu.org; Tue, 02 Feb 2016 02:50:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQVjg-0001BL-83 for guix-devel@gnu.org; Tue, 02 Feb 2016 02:50:57 -0500 In-Reply-To: <87vb68nkyb.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Cc: guix-devel --Sig_/YdEI1j1an9v.doB2HDa88aQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 01 Feb 2016 23:07:40 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: >=20 > An idea I haven=E2=80=99t taken the time to test yet would be to use > =E2=80=98properties=E2=80=99: >=20 > (define python-foobar ;with Python 3 > (package > (name "foobar") > ;; Specify which Python 2 variant to use. > (properties `((python2-variant . ,(delay python2-foobar)))))) >=20 > (define python2-foobar > (package (inherit python-foobar) > ;; =E2=80=A6 stuff beyond the mechanical python 2=E2=86=923 switch= =E2=80=A6 > )) >=20 > =E2=80=98package-with-python2=E2=80=99 would honor this =E2=80=98python2-= variant=E2=80=99 property. >=20 > Thoughts? >=20 > Ludo=E2=80=99. I like a lot that it should remove the need to propagate the special python= 2- packages all the way out to the leaf packages. What else could we use this for? minimal/bootstrap versions? "The python people" have said that one day python4 will happen and they don= 't plan on having it be as much of a break like the python2->python3 change wa= s. package-with-explicit-python is already set up to handle having a main package definition and multiple automated definitions. I prefer when define-public is the start of a package definition, but here's an idea I just had about refactoring out the common parts of python package= s. (let* (name "python-foobar") (version "1.2.3") ... (define-public python3-foobar (package-with-python3 python-foobar) (define-public python2-foobar (package (inherit (package-with-python2 python-foobar)) (native-inputs `(("python2-setuptools" ,python2-setuptools)) ,@(package-native-inputs foobar))))) --=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 --Sig_/YdEI1j1an9v.doB2HDa88aQ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWsF/UAAoJEPTB05F+rO6TQ30P/3daLJ2a71cHd3xRwM5GZkQv h3S5inO8nHYbDFkHY89dArGH094TM2w3LQQIsVn9d/UfMlqQ1i+UyeJyQtJoRbmV 5Q9iaiYNeRlPMPq7V0W2LuD0u7uio+gz6vFkMcsAio+HI8o7C+62ha/FVo2dQ9pF 57BKWQfhV4UT10b9pAYvkPItSPU90IAfxvGNqE3ToPhlfCXmNQoYP+cDxjuqhfmk LZ84c0erMH+yz5ufObOUzRSBkzMfK9d4Rb3EKN94BITE+Ba0ixMUzz1Zmylt+1ZU b75EACXDIr3Y1pN/WagSH7EqzhnRHnrDUEcg6HQ0DRJV2KM1bvBcxvX9jcaXo3NG Fq5X+dVqtGkgLsMzjzwSXqC7MfEg6VX/3O5EdVrUROlif95SrZIP4GAHa7/YOQn/ 6uscbHXXI5I85YFsnrAu3SpSPjR7sVubgbTayot2Q3q8sDZLu5JTtAkuAqpPZ5OG Br22Vk8sPcgCTorGb/D6sX3Wyj0K7w5FJzlf3zKMuge2IOYy8akIUr2IuBJ5oMRY XItmdf207Qa4l3qJQWL+lI1s3oK2lF0LmjVLunbSNhm7v/cDdAb5gZLLaKDD36WU 0i8WImSBPDo9gAjMXrIu+qCvplxJaBtgtu8tnPTWovkN65aKCqbxyKXxPaRZWphW z8WrmNuv7UsJLQaf5q/I =dQXk -----END PGP SIGNATURE----- --Sig_/YdEI1j1an9v.doB2HDa88aQ--