-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile binary Python wheels for Python 3.12 #399
Conversation
977c210
to
a0fca04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@janden Thanks, look great! Just have one question, I saw you committed a dummy extension in cufinufft setup.py and removed that dummy file extension .c file. Does it mean for cufinufft setup.py you don't have this issue commented in the following link?
finufft/python/finufft/setup.py
Line 42 in 1515186
# For certain platforms (e.g. Ubuntu 20.04), we need to create a dummy source |
Yes I tried this approach in the other PR (#393) but gave up for now. The reason is that since we include CUDA headers (in order to access the
So it does have the same issue. I haven't tried building the wheel on Ubuntu 20.04, but I did encounter it trying to build it on the FI cluster, which from what I understand runs Rocky 8. Installing the binary wheels there should be fine, it's just building them that's problematic due to the linking issue. At the end of the day, this probably needs a longer discussion in light of #394. Maybe |
Use `importlib` instead.
Since these are hardcoded, we have to update them once in a while.
Since `distutils` is removed from the standard library in Python 3.12, we need to switch to using the vendored version of `distutils` found in `setuptools._distutils`. Also, we make sure `setuptools` and friends are upgraded before patching and separate this from the library installation.
Running some of these commands (notably `pytest`) from `python/finufft` confuses the interpreter as it tries to look for `finufft.finufftc` in the source directory (`python/finufft/finufft`) instead of `site-packages`. This behavior seems to be related to replacing `imp` with `importlib`. At any rate, the solution is to stay in the repo root and run all the commands from there, prefixing with `python/finufft` when necessary.
fa15e74
to
6716185
Compare
Updates the code to use
importlib
instead ofimp
to make the library compatible with Python 3.12. Also updates the wheel building scripts to build wheels for Python 3.12 and test them.