From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Fixing package-with-python2 Date: Mon, 01 Feb 2016 23:07:40 +0100 Message-ID: <87vb68nkyb.fsf@gnu.org> References: 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]:56635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQMdP-0005qC-Mc for guix-devel@gnu.org; Mon, 01 Feb 2016 17:07:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQMdL-0007JZ-LL for guix-devel@gnu.org; Mon, 01 Feb 2016 17:07:47 -0500 In-Reply-To: (David Thompson's message of "Mon, 1 Feb 2016 08:49:10 -0500") 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: "Thompson, David" Cc: guix-devel "Thompson, David" skribis: > On Mon, Feb 1, 2016 at 8:06 AM, Efraim Flashner w= rote: > >> I looked over the commit but not deeply enough yet, would it be possible= 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-va= riant=E2=80=99 property. Thoughts? Ludo=E2=80=99.