jackh726 / bigtools

A high-performance BigWig and BigBed library in Rust
MIT License
65 stars 5 forks source link

pybigtools: NumPy 2.0 #43

Open nvictus opened 3 months ago

nvictus commented 3 months ago

Numpy just released its 2.0, which includes ABI breaks, and a migration guide. We should check that nothing breaks or pin numpy < 2 until migration is complete.

nvictus commented 2 months ago

Re: ABI compatibility

https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice

When you build wheels for your package using a NumPy 2.x version at build time, those will work with NumPy 1.xx.

So for pybigtools, we want a numpy 2.x dependency at build time. i.e.:

[build-system]
requires = ["maturin>=1.0,<2.0",  "numpy>=2.0,<3.0"]
build-backend = "maturin"
...
jackh726 commented 2 months ago

That seems fine - I did a bit of testing and didn't encounter any problems.

nvictus commented 2 months ago

I take it back. For pyO3-based bindings, the build time dependency that matters is rust-numpy.