From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: bug#22437: Fixing package-with-python2 Date: Sun, 7 Feb 2016 12:09:29 +0100 Message-ID: <20160207110929.GA4968__45098.2443443083$1454843422$gmane$org@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]:55990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSNED-0005lB-Vd for bug-guix@gnu.org; Sun, 07 Feb 2016 06:10:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSNEA-0006DV-Q4 for bug-guix@gnu.org; Sun, 07 Feb 2016 06:10:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:56128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSNEA-0006DR-N4 for bug-guix@gnu.org; Sun, 07 Feb 2016 06:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSNEA-0006R2-BW for bug-guix@gnu.org; Sun, 07 Feb 2016 06:10:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87twlqxjsc.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-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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