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
Use preinstalled Python 3 for cibuildwheel
action
#1145
Conversation
There is at least 3.7 in every runner https://github.com/actions/virtual-environments
18.04 has 3.6. And using setup-python is recommended on GHA, and this example1 is more about showing generally how to use cibuildwheel, not the specifics of what's installed in a runner. You really should use pipx, or our custom action2, etc. if this was about GHA. GHA recommends using setup-python if you need Python. If you are on a different CI system, the same steps apply: make sure you check out code, make sure Python is available, run cibuildwheel. This means we should show setup-python here. Also, I know we added Footnotes |
And Line 43 in cc56a14
"because it ensures consistent behavior across different runners". For me |
|
It would be nice to change that, though! Hopefully if setup-python gains better composite actions support, we can drop 3.6 from the host. Don't we want consistent behavior across runners? And if we tell people to use I'm not terribly against it but I think the current method is a bit closer to best-practices for GHA examples. Put me down as -0.1. |
It's something you do have to be at least a little aware of, and I've been in favor of making it more obvious (by printing the host Python version in the initial printout), but I'm not in the majority there. It was much better before v4 started forcing you to specify a version (discussion in actions/setup-python#421), as leaving it verisonless was clearer. |
Cover all runners with a test that builds simple wheel will signal when this version becomes a problem. Speaking of this test, why there are no tests running with GHA?
And switching to 3.6 would leave out builds without GHA on Ubuntu 18.04 (https://packages.ubuntu.com/bionic/python3). The project already can bootstrap needed Python versions to run code inside it, so if coding with 3.6 is that painful, it might be possible to keep the bootstrap part minimal (and probably reused from outside) and run the rest of |
Calling e.g. https://github.com/actions/starter-workflows/blob/main/ci/python-app.yml |
There is at least 3.7 in every runner
https://github.com/actions/virtual-environments