From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: Fixing package-with-python2 Date: Mon, 1 Feb 2016 17:12:34 -0500 Message-ID: References: <87vb68nkyb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59297) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQMi4-0007R1-Qz for guix-devel@gnu.org; Mon, 01 Feb 2016 17:12:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQMi3-0001Ss-Qg for guix-devel@gnu.org; Mon, 01 Feb 2016 17:12:36 -0500 Received: from mail-yk0-x231.google.com ([2607:f8b0:4002:c07::231]:34128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQMi2-0001RK-Js for guix-devel@gnu.org; Mon, 01 Feb 2016 17:12:35 -0500 Received: by mail-yk0-x231.google.com with SMTP id u9so34628735ykd.1 for ; Mon, 01 Feb 2016 14:12:34 -0800 (PST) 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel On Mon, Feb 1, 2016 at 5:07 PM, Ludovic Court=C3=A8s wrote: > "Thompson, David" skribis: > >> On Mon, Feb 1, 2016 at 8:06 AM, Efraim Flashner = wrote: >> >>> I looked over the commit but not deeply enough yet, would it be possibl= e to >>> use some of the logic in this to fix the package-with-python2 issue? >> >> Here's a potential solution for 'package-with-python2': module >> introspection. > > Evil! ;-) > > An idea I haven=E2=80=99t taken the time to test yet would be to use > =E2=80=98properties=E2=80=99: > > (define python-foobar ;with Python 3 > (package > (name "foobar") > ;; Specify which Python 2 variant to use. > (properties `((python2-variant . ,(delay python2-foobar)))))) > > (define python2-foobar > (package (inherit python-foobar) > ;; =E2=80=A6 stuff beyond the mechanical python 2=E2=86=923 switch= =E2=80=A6 > )) > > =E2=80=98package-with-python2=E2=80=99 would honor this =E2=80=98python2-= variant=E2=80=99 property. > > Thoughts? I'm happy that my evil suggestion got a better solution to show itself. :) - Dave