From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: bug#22437: Fixing package-with-python2 Date: Sun, 7 Feb 2016 12:09:29 +0100 Message-ID: <20160207110929.GA4968@debian> References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSNDl-0005ZG-Pv for guix-devel@gnu.org; Sun, 07 Feb 2016 06:09:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSNDj-0006AW-MQ for guix-devel@gnu.org; Sun, 07 Feb 2016 06:09:37 -0500 Received: from mailrelay6.public.one.com ([91.198.169.200]:28539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSNDj-0006A8-BN for guix-devel@gnu.org; Sun, 07 Feb 2016 06:09:35 -0500 Content-Disposition: inline In-Reply-To: <87twlqxjsc.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 =?iso-8859-15?Q?Court=E8s?= Cc: guix-devel , 22437@debbugs.gnu.org Hello, this looks really good, but I do not understand why we need the additional private variable, for instance %python-cython: On Wed, Feb 03, 2016 at 09:47:15AM +0100, Ludovic Courtès wrote: > -(define-public python-cython > +(define %python-cython > (package > (name "python-cython") > (version "0.23.4") > @@ -2946,8 +2946,13 @@ programming language and the extended Cython programming language. It makes > writing C extensions for Python as easy as Python itself.") > (license asl2.0))) > > +(define-public python-cython > + (package > + (inherit %python-cython) > + (properties `((python2-variant . ,(delay python2-cython)))))) > + > (define-public python2-cython > - (package (inherit (package-with-python2 python-cython)) > + (package (inherit (package-with-python2 %python-cython)) > (name "python2-cython") > (inputs If python2-cython inherits from (package-with-python2 python-cython), is not the only difference that it keeps the properties field? And would this not be harmless, as we are not going to call package-with-python2 again? Or would this create a circular dependency with (delay python2-cython)? (In C or Pascal, this would not be a problem, one could simply declare things before they are used, and that is it.) It would be more elegant to drop the additional variable if possible. Andreas