From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: [PATCH] gnu: Add Scikit-learn. Date: Fri, 27 Feb 2015 23:48:34 +0100 Message-ID: <20150227224834.GA6114@debian> References: <20150223175238.GA10579@debian.eduroam.u-bordeaux.fr> <20150225225215.GA13330@debian> <20150225225740.GA13495@debian> <87bnkg61js.fsf@gnu.org> <20150226175900.GA3835@debian> <648692e7170fada41ebd45ebe0724e42@openmailbox.org> <20150226204309.GA12643@debian> <34d78aa36c64669e2a26bc58b3fa9de6@openmailbox.org> <20150227094151.GA4043@debian.eduroam.u-bordeaux.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRTi5-0006ph-O5 for guix-devel@gnu.org; Fri, 27 Feb 2015 17:48:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRTi2-0006Vl-Hy for guix-devel@gnu.org; Fri, 27 Feb 2015 17:48:41 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:59391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRTi2-0006VS-8i for guix-devel@gnu.org; Fri, 27 Feb 2015 17:48:38 -0500 Content-Disposition: inline In-Reply-To: <20150227094151.GA4043@debian.eduroam.u-bordeaux.fr> 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: Eric Bavier Cc: Guix-devel On Fri, Feb 27, 2015 at 10:41:51AM +0100, Andreas Enge wrote: > So let us rename python(2)-py(2)cairo to python(2)-pycairo. If nobody beats > me to it, I can do it tomorrow. Well, if I am not mistaken, renaming does not solve the problem really. I had forgotten how 'package-with-python2' works: It does not replace the input 'python-foo' with 'python2-foo', but with '(package-with-python2 python-foo)' (and this recursively). Now, 'python2-pycairo' is not the same as '(package-with-python2 python-pycairo)' (in particular the source fields are changed). This means that if one has a package with 'python-pycairo' as input, then its python2 version cannot simply be created using 'package-with-python2'. And worse, if one has a package with input a package with input 'python-pycairo', one needs to unravel even one level more. And so on. This is very unpleasant. (See the definition of 'python2-matplotlib', in which some inputs are rewritten by hand. And 'python2-scipy' inherits the problem, since it has as input 'python2-matplotlib'.) This has actually been discussed in November on the list... Now, as also discussed before, we cannot look at variable names and just rewrite them syntactically. But can we adapt the package definition to depend on the 'name' field, which changes in a predictible way? For instance: 'python2-pycairo' differs from '(package-with-python2 python-pycairo)' only in the 'source' field (and the 'license' field, which is a minor point for the sake of building). So could we redefine the source depending on the 'name' field, which is 'python-pycairo' in one case and 'python2-pycairo' in the other? Can we use in the 'source' field something like (if (string=? name "python-pycairo" source-x source-y)) ? I assume that yes - after all, we already use the 'version' field in the 'source' field. This can only work if the fields are evaluated in the right order. Is it the order in the definition of the 'package' record? Andreas