guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: Add Scikit-learn.


From: Andreas Enge
Subject: Re: [PATCH] gnu: Add Scikit-learn.
Date: Fri, 27 Feb 2015 23:48:34 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]