-
Notifications
You must be signed in to change notification settings - Fork 262
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
Support GraalPy #1538
base: main
Are you sure you want to change the base?
Support GraalPy #1538
Conversation
ad26df1
to
ab43cbb
Compare
Would it make sense to include it?
Maybe it's time to think about adding this. It comes up occasionally. I'd like to also remove pypy37 and pypy38 from the default, as they are no longer supported by upstream. |
It would certainly be neater if it was included. Also, I've never heard of GraalPy, so I can't assess wether it's inclusion and maintenance here would be worth it for users. If Manylinux were to adopt it, that would make the decision much easier!
Hm. Yes, agreed. It would also allow us to soft-drop EoL CPythons, while keeping the functionality. The simplest way to do this would be to set a default for CIBW_BUILD. E.g. the default could be |
I was under the assumption that manylinux (like e.g. conda) wants to build everything into their images from source, but now I see that they also just download PyPy binaries and put them in there, so I can open a PR there to do the same for GraalPy. This will simplify this PR.
That's what I also thought. I did this, which is just skipping any Python specifier starting with |
Converting to draft until manylinux support lands. |
manylinux support has landed. It will be available in cibuildwheel once the update workflow runs & gets merge. |
I've updated the PR to use the manylinux support, but in the meantime |
uv now supports GraalPy on |
5dfb310
to
69760d9
Compare
60b55f6
to
c012a0f
Compare
@timfel, I don't know if you're still actively working on this, but we have a v3.0 release coming up, which would be a perfect time to land a feature like this! |
What is the timeframe for 3.0? We are still working on this, but needed a few fixes in tox, uv, and virtualenv to go in first. The virtualenv fix is still not merged because we can only pass it with the new GraalPy release that is due out in March |
Ah, I didn't realise there were blockers.
No definitive timeline, (when it's ready ;) ) but probably some time over the next few weeks. |
March is probably too far out for us to hold the 3.0 release for specifically. Not a problem, it can arrive in a point update, I just thought it would be neat :) |
Wild guess: is it trying to build for both 32-bit and 64-bit on Windows, but actually producing the 64-bit wheels both times? I see that's a |
Does GraalPy support the stable ABI? I see one test failing for that, I'd assume it's not supported. I also see |
It looks to me that
Could this be an issue with |
Yes, GraalPy has a few bugs on Windows when using build. I got past most of them now I think, failed at 98% of the tests just earlier so I hope I'll have this ready by tomorrow. |
Ok, everything green now in Github actions. Let's see if circleci and azure agree :) |
Looks like it's hitting a "couldn't find uv" error. Our tests run with or without uv. Is uv required? We could skip if it's not present. |
Ah, yeah, I linked oracle/graalpython#491 - we have a bug when build uses virtualenv and isolation for building only on Windows, so my workaround was to force using uv with GraalPy on Windows. Only when building the GraalPy wheels on windows with |
Ok, Windows is now green on Azure, not sure why the Linux build got cancelled considering it passed before 🤔 |
Thank you @henryiii for fixing the pipeline :) Just to make sure no one is waiting here for us now, is there anything else I should do about this PR right now, or is it fine to just wait for review comments? |
@@ -18,6 +18,7 @@ python_configurations = [ | |||
{ identifier = "pp39-manylinux_x86_64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" }, | |||
{ identifier = "pp310-manylinux_x86_64", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" }, | |||
{ identifier = "pp311-manylinux_x86_64", version = "3.11", path_str = "/opt/python/pp311-pypy311_pp73" }, | |||
{ identifier = "gp242-manylinux_x86_64", version = "3.11", path_str = "/opt/python/graalpy311-graalpy242_311_native" }, |
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.
Wheels have to be made for each minor version too? I guess this means we can't drop all the workarounds until we drop gp242
(unless there's a patch release planned)?
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.
We are doing patch releases, I missed the merge window for a patch release that goes out next week, but I'm confident I can get the required fixes in for our patch release in June, at which time we can drop this.
Versioning is a bit confusing right now, we used to do calendar versioning with two releases per year, but we are switching to align with the OpenJDK release schedule and will then have 2 releases per year. At that point every 4th release will be a long-term support release, releases in between will only receive support for 6 months. The upcoming release 25 (due out in Sep) will be an LTS, so we could then stick to that for 2 years and also have 26/27/28 each for 6 months until we go to 29 at which point 25 is out of support.
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.
So in terms of ABI stability, a sample wheel I just produced was given the filename
spam-0.1.0-graalpy311-graalpy242_311_native-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
. So it does look like there's only ABI stability within each minor release of GraalPy (i.e. across patch releases), is that right?
(I just want to check the logic behind this build identifier, as most have the python version at the start, not the interpreter version. But if the ABI stability is tied to the GraalPy minor version, this makes sense to me.)
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.
This can be batched with other changes if someone else requests changes.
azure-pipelines.yml
Outdated
@@ -16,18 +16,19 @@ jobs: | |||
docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all | |||
python -m pip install dependency-groups | |||
python -m dependency_groups test | xargs python -m pip install -e. | |||
python ./bin/run_tests.py | |||
python ./bin/run_tests.py --num-processes 2 |
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.
python ./bin/run_tests.py --num-processes 2 | |
python ./bin/run_tests.py |
azure-pipelines.yml
Outdated
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '3.11' | ||
- bash: | | ||
python -m pip install dependency-groups | ||
python -m dependency_groups test | xargs python -m pip install -e. | ||
python ./bin/run_tests.py --num-processes 2 | ||
python ./bin/run_tests.py --num-processes 3 |
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.
python ./bin/run_tests.py --num-processes 3 | |
python ./bin/run_tests.py |
azure-pipelines.yml
Outdated
@@ -39,4 +40,4 @@ jobs: | |||
- bash: | | |||
python -m pip install dependency-groups | |||
python -m dependency_groups test | xargs python -m pip install -e. | |||
python ./bin/run_tests.py | |||
python ./bin/run_tests.py --num-processes 2 |
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.
python ./bin/run_tests.py --num-processes 2 | |
python ./bin/run_tests.py |
for more information, see https://pre-commit.ci
@@ -18,6 +18,7 @@ python_configurations = [ | |||
{ identifier = "pp39-manylinux_x86_64", version = "3.9", path_str = "/opt/python/pp39-pypy39_pp73" }, | |||
{ identifier = "pp310-manylinux_x86_64", version = "3.10", path_str = "/opt/python/pp310-pypy310_pp73" }, | |||
{ identifier = "pp311-manylinux_x86_64", version = "3.11", path_str = "/opt/python/pp311-pypy311_pp73" }, | |||
{ identifier = "gp242-manylinux_x86_64", version = "3.11", path_str = "/opt/python/graalpy311-graalpy242_311_native" }, |
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.
So in terms of ABI stability, a sample wheel I just produced was given the filename
spam-0.1.0-graalpy311-graalpy242_311_native-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl
. So it does look like there's only ABI stability within each minor release of GraalPy (i.e. across patch releases), is that right?
(I just want to check the logic behind this build identifier, as most have the python version at the start, not the interpreter version. But if the ABI stability is tied to the GraalPy minor version, this makes sense to me.)
"""python -c "import sys; open('{project}/pythonversion_bb.txt', 'w').write(sys.version)" && """ | ||
f'''python -c "import sys; open('{{project}}/pythonprefix_bb.txt', 'w').write({SYS_PREFIX})"''' | ||
"""python -c "import sys; f = open('{project}/pythonversion_bb.txt', 'w'); f.write(sys.version); f.close()" && """ | ||
f'''python -c "import sys; f = open('{{project}}/pythonprefix_bb.txt', 'w'); f.write({SYS_PREFIX}); f.close()"''' |
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.
What's the reason for this change? I wouldn't expect a problem here given that the Python process is exiting immediately - is the behaviour on GraalPy different?
This PR adds support for GraalPy.
A couple of questions:
CIBW_BUILD
variable explicitly.