Modernize build for Python 3.10+/3.12 and NumPy 2#38
Open
homfunc wants to merge 2 commits intogetspams:mainfrom
Open
Modernize build for Python 3.10+/3.12 and NumPy 2#38homfunc wants to merge 2 commits intogetspams:mainfrom
homfunc wants to merge 2 commits intogetspams:mainfrom
Conversation
- Switch to explicit PEP 517 backend (setuptools.build_meta) - Drop distutils/numpy.distutils usage - Make BLAS/LAPACK/OpenMP configuration env-overridable - Replace pkg_resources with importlib.metadata Co-Authored-By: Warp <agent@warp.dev>
- Vendor SWIG 4.2.0 generated spams_wrap.{cpp,py}
- Build extension as spams_wrap._spams_wrap to match generated imports
- Document OpenBLAS/OpenMP warning and mitigation
Co-Authored-By: Warp <agent@warp.dev>
Collaborator
|
There is alot of things in there, so did you re-generate the swig wrappers or edit the cpp file directly ? |
Author
|
There are a lot of things - apologies for that. I regenerated the swig wrapper and there is another PR in spams-devel: spams-devel update SWIG for Python 3.12+ and NumPy 2. The driver was mainly to support NumPy 2 but I figured that updating the SWIG sources was the best idea. |
Collaborator
|
No it is a great idea, it's just I realised I also updated the wrappers on my side to swig 4.3.0 (here it says it's 4.2.0) and also updated the build system to use meson. While the meson part is a big change as it dumps setup.py in the process but makes it far easier to find any blas implementation, just changing the wrapper is easy enough indeed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR modernizes the Python packaging/build for SPAMS to work out-of-the-box with Python 3.10+ (incl. 3.12) and NumPy 2.
Key changes:
Notes:
Co-Authored-By: Warp agent@warp.dev