-
Notifications
You must be signed in to change notification settings - Fork 49
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
Build wheels with numpy 2.0. #1252
Conversation
dd0295e
to
aa406c6
Compare
Test wheels witht the oldest supported numpy.
Wheels are now building. The next step is to refactor There is no need to test oldest dependencies in |
2c16f12
to
9ac58eb
Compare
I don't know why the testpypi build is failing. Along with support for numpy 2.0 in the PyPI builds, this PR refactors much of freud's CI to use modern practices (lock files, uv, micromamba). To support the numpy 2.0 ABI, I had to drop support for Python 3.8. The PyPI builds test against the oldest requirements, so I modified the |
After the last commit CI failed to build the wheels for 3.10:
The CI errors when testing the wheel after it was already built and during the environment setup for running the test. From the log it can be seen that multiple different versions of numpy are downloaded and used - 1.22.4 and 1.26.4 (although its unclear if that is the problem, but it might be). During the step when the wheel is installed pip assumes that the requirement for freud is numpy>1.19 and just installs the latest version it finds (1.26.4):
Later down the line when installing other testing requirements the correct version of numpy is used for installation (1.22.4). Rerunning the CI seems to have "fixed" that. Totally unclear on why that helped. Uploading to test pypi still fails. |
This comes from
Yes, this is the expected behavior. When testing, cibuildwheel installs freud into an empty environment:
Which will pull in the latest dependencies that match.
The next command cibuildwheel issues is
which downgrades packages to the lowest versions for testing. As the comment in |
Regarding the failing sdist upload: this is considered not a bug by the gh-action-pypi-publish developers. They advise appending a commit-specific suffix to the version so every commit uploads a new set of wheels. At the same time, the packaging guidlines state:
So, let's remove the TestPyPI upload step from CI. The only purpose it served was to test that our actions syntax was correct before the upload to PyPI occurs on tagging. That has been tested, so it is no longer needed. The only other improvement we could do here is to adopt the officially blessed trusted publishing system. However, the code we have now is proven and working. I don't see a need to fix something that isn't broken. |
Description
Support numpy 2.0 in PyPI packages. This requires dropping builds for Python 3.8.
Motivation and Context
Allow users to
pip install freud
now and maintain compatibility when they install an updated numpy 2.0 in the future.How Has This Been Tested?
CI tests.
Types of changes
Checklist: