GNU bug report logs - #22808
Add a function to simplify many of the new python2-foo definitions

Previous Next

Package: guix;

Reported by: Christopher Allan Webber <cwebber <at> dustycloud.org>

Date: Thu, 25 Feb 2016 21:15:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: Christopher Allan Webber <cwebber <at> dustycloud.org>, 22808 <at> debbugs.gnu.org
Subject: bug#22808: Add a function to simplify many of the new python2-foo definitions
Date: Tue, 26 Apr 2016 15:09:15 +0200
Efraim Flashner <efraim <at> flashner.co.il> skribis:

> On Tue, Apr 26, 2016 at 11:54:28AM +0200, Ludovic Courtès wrote:
>> ludo <at> gnu.org (Ludovic Courtès) skribis:

[...]

>> What about this:
>> 
>
>> --- a/gnu/packages/python.scm
>> +++ b/gnu/packages/python.scm
>> @@ -345,6 +345,14 @@ instead of @command{python3}.")))
>>  (define-public python-wrapper (wrap-python3 python))
>>  (define-public python-minimal-wrapper (wrap-python3 python-minimal))
>>  
>> +(define (package-with-python2+setuptools p)
>> +  (let ((base (package-with-python2 (strip-python2-variant p))))
>> +    (package
>> +      (inherit base)
>> +      (native-inputs `(("python2-setuptools" ,python2-setuptools)
>> +                       ,@(package-native-inputs base))))))
>> +
>> +
>>  (define-public python-psutil
>>    (package
>>      (name "python-psutil")
>
>> 
>> Then we need to change all the occurrences of this pattern to use this
>> new procedure.
>> 
>> Thoughts?
>> 
>> Ludo’.
>
> Would we still need the properties field in python-foo?

Yes.

> What would this mean for packages that need python2-setuptools and other
> python2- specific packages? Specifically, would all the calls to
> package-native-inputs cause a slowdown in computing the package?

It wouldn’t change anything, since this exact same pattern is already
used in many different places in python.scm (search for
“python2-setuptools” and you’ll see :-)).  It would simply allow us to
factorize it.

Ludo’.




This bug report was last modified 6 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.