mapbox_earcut_python icon indicating copy to clipboard operation
mapbox_earcut_python copied to clipboard

Numpy 2.0 Wheels

Open mikedh opened this issue 1 year ago • 0 comments

Thanks for maintaining these bindings!! I'm working on supporting the Numpy 2.0 release and I noticed that the current wheels + Numpy 2.0 do some funky stuff. I was able to fix it with a simple re-build, although on further investigation I'm not sure why that worked (maybe it used a new pybind11 from my environment?) haha.

It appears that the minimal thing we need to do is pin pybind11>=2.12 which supports both Numpy 1.x and 2.x and re-build. However I was poking and it looks like tests may not have been running on the wheels so I ended up also changing:

  • I moved the cibuildwheel logic and project information into pyproject.toml and only left the extension stuff in setup.py.
  • I don't think cibuildwheel was running tests previously? I added a test-command that runs pytest with a default install (Numpy 1.x), and then also tests with a Numpy 2.0 prerelease if one is available for that platform (this did previously fail).
  • I changed the build version pin to pybind11==2.12.0
  • Wheels are currently building.

If the infrastructure changes are too much I'd be also happy to re-open this as the minimal PR which would (I think) be:

  • pin pybind11==2.12.0
  • bump version

mikedh avatar May 11 '24 00:05 mikedh