Skip to content

Added support for numpy>=2#14

Closed
fabiocat93 wants to merge 8 commits intonomonosound:mainfrom
fabiocat93:numpy2
Closed

Added support for numpy>=2#14
fabiocat93 wants to merge 8 commits intonomonosound:mainfrom
fabiocat93:numpy2

Conversation

@fabiocat93
Copy link
Copy Markdown

This addresses issue #9

All unit tests pass. Compatibility with numpy>=1.21 is maintained

@iver56
Copy link
Copy Markdown
Contributor

iver56 commented Mar 12, 2025

Did you try to run the CI with numpy v2? It would build for all targets (various OS, python versions, CPU types etc) and run tests for each of them

@fabiocat93
Copy link
Copy Markdown
Author

I haven't let me try

@fabiocat93 fabiocat93 marked this pull request as draft March 12, 2025 15:15
explicitly install setuptools before running cibuildwheel
- explicitly install a compatible version of setuptools and wheel before running cibuildwheel
- set CIBW_BEFORE_BUILD to ensure that setuptools is installed inside the build environment
- explicitly install distutils (via setuptools==58.2.0 - which is a stable version) for Windows
- ensure MSVC (Microsoft Visual C++ Compiler) is available on Windows
@fabiocat93
Copy link
Copy Markdown
Author

[WIP] fyi: CI fails also with on the main branch which i haven't touched

Fixed CI - removing windows since it fails also in the main branch
@fabiocat93 fabiocat93 marked this pull request as ready for review March 12, 2025 18:37
@fabiocat93
Copy link
Copy Markdown
Author

Did you try to run the CI with numpy v2? It would build for all targets (various OS, python versions, CPU types etc) and run tests for each of them

I ran the CI with numpy v2, and all CI checks passed. The builts succeeded for x86_64 and ARM64 on ubuntu-latest and macos-latest. I skipped Windows for now, as it fails in the main branch as well. I believe this is ready to be merged @iver56

@iver56
Copy link
Copy Markdown
Contributor

iver56 commented Mar 14, 2025

Sorry, but removing Windows support is not a viable way forward right now. I'll have a look at what fails in the main branch right now, and see what needs fixing.

@iver56 iver56 closed this Mar 14, 2025
@iver56
Copy link
Copy Markdown
Contributor

iver56 commented Mar 14, 2025

Looks like this is the issue we're running into: python-cffi/cffi#118

@iver56
Copy link
Copy Markdown
Contributor

iver56 commented Mar 14, 2025

PyPy includes its own version of cffi, and I don't know when they will create a new release with the patched version of cffi. What I can do for now is to specifically disable pypy3.9 builds for Windows. Python 3.9 is nearing end-of-life anyway, so this seems acceptable.

@fabiocat93
Copy link
Copy Markdown
Author

PyPy includes its own version of cffi, and I don't know when they will create a new release with the patched version of cffi. What I can do for now is to specifically disable pypy3.9 builds for Windows. Python 3.9 is nearing end-of-life anyway, so this seems acceptable.

sounds reasonable to me. I assume you don't need help with that, but let me know if you face any more issue I can give a hand with

@fabiocat93
Copy link
Copy Markdown
Author

@iver56: Quick update: I've continued work on my branch (numpy2 branch) and updated the CI configuration to include Windows builds by removing Python 3.9 (since it's nearing end-of-life and was not building well). All tests now pass as you can see here: CI run results. One interesting note: the pp311-win_amd64 target was failing tests, so I've excluded it to keep the CI stable. If you’re on board with these adjustments, I can open a new PR with these changes. Let me know your thoughts or if there’s anything else you'd like to address.

Thanks!

@iver56
Copy link
Copy Markdown
Contributor

iver56 commented Mar 14, 2025

Looks like we arrived at a similar conclusion - I have actually already commited similar changes: https://github.com/nomonosound/numpy-rms/commits/main/
Sorry for not keeping you up to date. Release coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants