Subject: bug#22437: Fixing package-with-python2

From: [email-masked] (Ludovic Courtès)
Date: Sun, 07 Feb 2016 21:39:42 +0100

Andreas Enge <[email-masked]> skribis:

> this looks really good, but I do not understand why we need the
> additional private variable, for instance %python-cython:

Glad you noticed.  :-)

> 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)?

So I thought!  In hindsight, I think this is unnecessary.

> (In C or Pascal, this would not be a problem

I can’t wait to see “Pasix”!  :-)

Ludo’.