-
Notifications
You must be signed in to change notification settings - Fork 219
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
Rework PyPy installation #1518
Rework PyPy installation #1518
Conversation
@pypa/cibuildwheel-maintainers, Any thoughts on this |
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.
I think the approach generally seems good. Probably most packagers are getting manylinux only for CPython, so deferring the other interpreters to runtime makes sense, and will cut down on size and download time.
Any numbers on how long the install of an interpreter takes? The interpreters themselves look like just tarfile extracts, but there's also the pip install bit.
We'd want to get manylinux-python support into cibuildwheel before the rollout of this feature I suppose. Within cibuildwheel, if pypy was excluded, I can see a potential issue in our integration test suite, because a few tests do use pypy. The pypy install would happen on each test run, rather than being reused from previous runs. This would increase the CI time quite a bit, I think (and be wasteful on bandwidth).
(Just thinking.... another idea could be a manylinux-slim series of images, which contain cpython only, and a set of manylinux-full images, which use manylinux-slim as a BASE and install all the interpreters on top. No idea how much work it would be to make that happen, but would be quite neat. cibuildwheel could choose the slim variants if it only needs cpython, but use the full ones in the tests)
I don't have them right now but you're right, there's also the pip install bit, it's worth figuring this out now. I'll try this out on GHA (my connection is so slow that it wouldn't be representative of CI usage).
Indeed, we'd want to get manylinux-python support into cibuildwheel before removing any pre-installed PyPy versions.
As for cibuildwheel tests, this can be worked around quite easily I think (e.g. re-commit all images with
I don't think it would be too difficult to add full images but I'd rather not multiply images if the "fix" is just to call The only issue I can see would be local usage, where, not to re-install everytime, one would need to re-commit all images with |
4b86663
to
d1fc534
Compare
Indeed the pip install bit was longer than I thought, this was mostly due to The initial timings where somewhere around 20s for 1 PyPy install / 1m 45s for GraalPy |
I'm going to split the PR given there are still some things to workout throughout the ecosystem for GraalPy. |
a5e288a
to
2183c59
Compare
There's still some doc missing for manylinux-interpreters, otherwise, I think all comments have been addressed. @joerick, am I missing something in my answers or do you have more comments ? |
2183c59
to
87815c6
Compare
Sorry for the delay, all good from my perspective. I'm not fully understanding how we make this fast in the cibuildwheel CI context, but that's downstream it sounds like you have an idea :) |
87815c6
to
dabbcdd
Compare
dabbcdd
to
cd3b37f
Compare
cd3b37f
to
a727b43
Compare
PyPy installation is just a tar extract. As such, it might be interesting to install PyPy at runtime rather than at build time. This is especially true for EOL versions of PyPy which would allow to reduce the image size, and thus, overall build time for users not using EOL PyPy versions. This commit does not modify default installed PyPy versions yet. This commit will also be useful for GraalPy installation.
a727b43
to
f1fac1c
Compare
PyPy installation is just a tar extract.
As such, it might be interesting to install PyPy at runtime rather than at build time.
This is especially true for EOL versions of PyPy which would allow to reduce the image size, and thus, overall build time for users not using EOL PyPy versions.
This PR does not modify default installed PyPy versions yet.
With this revisited installation method, it will be much easier to add GraalPy.
The argument to
manylinux-interpreters ensure
shall be the most specific PEP425{python_tag}-{abi_tag}
for a given interpreter to ease cibuildwheel integration in a first step (given cibuildwheel uses/opt/python/{python_tag}-{abi_tag}
, should be easy to add a call tomanylinux-interpreters ensure
there).