Hi,
I'm trying to build/update a package using mesonpy [1].
While going through the build process, exploring how the existing macros behave together with mesonpy, I came across a weird build error, for which I have not yet found a cause or explanation.
The build fails with [2]:
No matching package to install: 'python3dist(numpy) = 1.23.2'
The version in rawhide is 1.24.3, yet the requirement in pyproject.toml [3] is:
"numpy>=1.22.3"
So, why is it insisting on using 1.23.2 while the existing 1.24.3 satisfies the requirement?
There's one thing I noticed [4], which I believe is unrelated. But I asked upstream for clarification anyway.
The spec file is currently work in progress. I simply triggered a Copr build, so I could provide links here and verify that this is not a local issue in my build environment.
[1] So fresh it's still warm: https://src.fedoraproject.org/rpms/python-meson-python [2] https://download.copr.fedorainfracloud.org/results/gui1ty/neuro-sig/fedora-r... [3] https://github.com/has2k1/scikit-misc/blob/8f829888ecf0fa96eb18aeb3f723fc985... [4] https://github.com/has2k1/scikit-misc/issues/24
Cheers,
You’re right that project.dependencies has numpy>=1.22.3[1], but upstream is also pinning numpy versions in the build-system.requires section[2] in the same manner as oldest-supported-numpy[3]. This is for PyPI distribution purposes; we don’t need to build wheels that support numpy versions older than the one in Fedora, so you can un-pin these downstream. I would do something like this in %prep:
# Do not attempt to build with an old version of numpy; this makes sense for # PyPI distribution (oldest-supported-numpy) but not here. sed -r -i 's/(numpy)==/\1>=/' pyproject.toml
– Ben
[1] https://github.com/has2k1/scikit-misc/blob/main/pyproject.toml#L13
[2] https://github.com/has2k1/scikit-misc/blob/main/pyproject.toml#L86
[3] https://github.com/scipy/oldest-supported-numpy/
On 4/30/23 10:47, Sandro wrote:
Hi,
I'm trying to build/update a package using mesonpy [1].
While going through the build process, exploring how the existing macros behave together with mesonpy, I came across a weird build error, for which I have not yet found a cause or explanation.
The build fails with [2]:
No matching package to install: 'python3dist(numpy) = 1.23.2'
The version in rawhide is 1.24.3, yet the requirement in pyproject.toml [3] is:
"numpy>=1.22.3"
So, why is it insisting on using 1.23.2 while the existing 1.24.3 satisfies the requirement?
There's one thing I noticed [4], which I believe is unrelated. But I asked upstream for clarification anyway.
The spec file is currently work in progress. I simply triggered a Copr build, so I could provide links here and verify that this is not a local issue in my build environment.
[1] So fresh it's still warm: https://src.fedoraproject.org/rpms/python-meson-python [2] https://download.copr.fedorainfracloud.org/results/gui1ty/neuro-sig/fedora-r... [3] https://github.com/has2k1/scikit-misc/blob/8f829888ecf0fa96eb18aeb3f723fc985... [4] https://github.com/has2k1/scikit-misc/issues/24
Cheers,
On 30-04-2023 17:00, Ben Beasley wrote:
You’re right that project.dependencies has numpy>=1.22.3[1], but upstream is also pinning numpy versions in the build-system.requires section[2] in the same manner as oldest-supported-numpy[3]. This is for PyPI distribution purposes; we don’t need to build wheels that support numpy versions older than the one in Fedora, so you can un-pin these downstream. I would do something like this in %prep:
# Do not attempt to build with an old version of numpy; this makes sense for # PyPI distribution (oldest-supported-numpy) but not here. sed -r -i 's/(numpy)==/\1>=/' pyproject.toml
:facepalm:
I pledge tunnelvision (didn't scroll down far enough).
Thanks Ben!
-- Sandro
On 30. 04. 23 17:00, Ben Beasley wrote:
sed -r -i 's/(numpy)==/\1>=/' pyproject.toml
Just in case you don't already know this.
If the listed dependency is numpy==1.23.2, the sed above works fine.
But if the the dependency was numpy==1.23.*, the sed would generate an invalid requirement (* cannot be used with >=).
python-devel@lists.fedoraproject.org