Subject: Re: [bug#76240] [PATCH] gnu: Add NumPy 2 related variants.

From: Ludovic Courtès <[email-masked]>
Date: Mon, 21 Apr 2025 23:58:53 +0200

Hi Oleg,

Did you have a chance to look into this?

Thanks in advance,
Ludo’.

Ludovic Courtès <[email-masked]> writes:

> Hey Oleg,
>
> Ludovic Courtès <[email-masked]> skribis:
>
>> Sharlatan Hellseher <[email-masked]> skribis:
>>
>>> This to make Pandas, MatplotLib and SciPy compatible with NumPy 2.  They
>>> need to be build with newer version otherwise it raise the error.
>>>
>>> * gnu/packages/python-science.scm: (python-pandas-with-numpy-2,
>>> python-scipy-with-numpy-2): New variables.
>>>
>>> * gnu/packages/python-xyz.scm (python-matplotlib-with-numpy-2): New variable.
>>>
>>> Change-Id: I53878b643ea6f7b35e3d893a18da438c2c111c52
>>
>> [...]
>>
>>> +(define-public python-scipy-with-numpy-2
>>> +  (package
>>> +    (inherit python-scipy)
>>> +    (propagated-inputs
>>
>> Comment for all of these: it should be ‘package/inherit’ (to potentially
>> inherit replacements) and also change the ‘name’ field to distinguish
>> it.
>>
>> Actually, assuming we want to move to NumPy 2.x going forward, I would
>> suggest keeping the regular name for the -with-numpy-2 variants (like
>> “python-scipy”) and choose a different name for the NumPy 1.x variants
>> (like “python-scipy-with-numpy-1”).
>>
>> That way, somebody running:
>>
>>   guix shell python python-numpy python-scipy
>
> This broke ‘tests/guix-pack-relocatable.sh’ for these reasons:
>
> + guix pack -RR python-numpy python-scipy --no-grafts -n
> guix pack: error: profile contains conflicting entries for python-numpy
> guix pack: error:   first entry: [email-masked] /gnu/store/i1g6wbcc0ilhcc5vy4pi70z58gk1716f-python-numpy-2.2.2R
> guix pack: error:   second entry: [email-masked] /gnu/store/2s1jala0jg56drh4hc19mrdg6w3gswhm-python-numpy-1.24.4R
> guix pack: error:    ... propagated from [email-masked]
> guix pack: error:    ... propagated from [email-masked]
> hint: Backtrace:
>
> Would be nice to address it before we get a deluge of angry bug reports.
> :-)
>
> Ludo’.