dkriegner / xrayutilities

xrayutilities - a package with useful scripts for X-ray diffraction physicists
http://xrayutilities.sourceforge.io
GNU General Public License v2.0
83 stars 29 forks source link

Numpy 2.0 support #185

Closed dkriegner closed 5 months ago

dkriegner commented 6 months ago

Enforce building with numpy-2.0 to get universal wheels.

dkriegner commented 6 months ago

I could imagine that the changes of pyproject.toml annoy packagers. @picca: do you have any comment or suggestion for this? Or will you just patch it out on Debian anyways?

I am still gonna test this with Gentoo ebuilds and report back here.

picca commented 6 months ago

I could imagine that the changes of pyproject.toml annoy packagers. @picca: do you have any comment or suggestion for this? Or will you just patch it out on Debian anyways?

It you package is compatible with numpy 2.x and numpy1.x, what is the right way to express this constrain in pyproject ?

Debian is not yet ready to upload numpy 2.x, there is plenty of packages to upload with numpy 2 fixes. This will take a long time...

dkriegner commented 6 months ago

The package works seems to work with both numpy 1.x and numpy 2.x. But to get wheel files for PyPI these wheels have to be built using numpy 2.x since they otherwise won't work with both numpy versions. What I use in pyproject.toml is what is explicitly recommended by numpy.

I believe Debian can likely remove this numpy-2.0 dependency for the build system. If I would know a way to introduce this build requirement only for the cibuildwheel pipeline on Azure this might be a better option but the way it's now protects the users from breaking their xrayutilities installation if they update numpy.

picca commented 6 months ago

ok, we can patch pyproject in Debian.

Cheers

Fred

dkriegner commented 5 months ago

With Gentoo ebuilds this seems to still work just fine since they seem to ignore the dependencies in pyproject.toml in favor of looking the ones defined in the ebuild. merging