-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add musllinux wheel support, Use 'official' llvm build for compilation #13228
Conversation
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.
Thank you for improving this!
If I could bait you into doing a little more work...
This script was moved to the mypy repo from https://github.com/mypyc/mypy_mypyc-wheels a while back and I think that was the wrong decision, since it's now much harder to validate changes (as you allude to here: mypyc/mypy_mypyc-wheels#40).
How would you feel about moving it back? This would then make reviewing this PR and handling the merges trivial :-)
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.
Well your fork run is pretty convincing, so I'll just do the double merge and everything should work. We can move the script back across repos at any point in time.
I'll merge this on Monday or Tuesday, in case Jukka wants to do a 0.972 (in which case I'd like to avoid build changes right before he does so)
This comment has been minimized.
This comment has been minimized.
@hauntsaninja Thanks for reviewing :) I have a different suggestion - Maybe wheels build workflow should move entirely to this project? Coupling the CI configuration with the project's repo should make it easier to review and adapt to changes. Problem with that approach is that only 'regular' releases will have an actual GitHub release, but is it really that bad to get development wheels from workflow's build artifacts? Anyway as you said, it's something to address later 😛 |
0a9aad6
to
97e7ace
Compare
@hauntsaninja Is it still going to be merged soon? 😉 (Edit: Saw the label now haha) Rebased it to fix conflicts and ran This change for example in - env['CIBW_BEFORE_TEST'] = """
+ env[
+ "CIBW_BEFORE_TEST"
+ ] = """
(
grep -v lxml {project}/mypy/test-requirements.txt > /tmp/test-requirements.txt
&& cp {project}/mypy/mypy-requirements.txt /tmp/mypy-requirements.txt
&& cp {project}/mypy/build-requirements.txt /tmp/build-requirements.txt
&& pip install -r /tmp/test-requirements.txt
)
- """.replace('\n', ' ')
+ """.replace(
+ "\n", " "
+ ) Note there are some new failures when invoking build workflow for Python 3.6, 3.10 and sdist jobs. |
97e7ace
to
5810f05
Compare
Thanks for rebasing. Agreed that some of black's decisions here are questionable. But.... whatever 🤷 Thanks for mentioning. check-manifest should be fixed by #13288 |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Okay, hopefully: |
Seems like it does, thanks for the effort :) |
Great, merged both your PRs, thank you for this! |
As of python/mypy#13228 we no longer use the a custom clang build
As of python/mypy#13228 we no longer use the a custom clang build
Description
This PR has a couple of goals:
musllinux
mypy wheels, for more users to enjoy mypyc's performance improvements.clang
used in CI (incompatible with newer manylinux images?).Upgrades custom clang 6.0.1 to redhat-provided 7.0.1.
manylinux2014
wheels instead of EOLmanylinux2010
. Those users will switch to non-compiled releases.Note For Merging
As available llvm versions are tied to the OS release, cibuildwheel needs to be updated to v2.3+ (Which defaults to manylinux2014) to keep
yum install
working.As for musllinux, cibuildwheel needs to be updated to v2.2+.
This PR should handle both by upgrading to the latest release, but needs to be merged at the same time to not break builds:
mypyc/mypy_mypyc-wheels#40
Related to mypyc/mypy_mypyc-wheels#34
Test Plan
Build & Tests
Invoked mypyc CI matrix for all supported platforms, it appears to fully pass :)
https://github.com/ben9923/mypy_mypyc-wheels/actions/runs/2722183433
Wheel Compatibility
To make sure clang upgrade did not break compatibility with manylinux2014 distros (by linking with too new glibc or something), I tested built wheels with some of them (compatible distros listed here).
All of the following seem to work well: CentOS 7, CentOS 8, Fedora 32, Photon 4.0, Ubuntu 20.04, Debian 11.
For musl, tested: Alpine 3.10, Alpine 3.12, Alpine 3.16.
musllinux Performance
musllinux wheels seem to have a similar performance boost to manylinux.
Invoked mypy on the
fastapi
repo with universal & platform-specific wheels, and it had a similar ~7.5s vs. ~2s time difference across those two platforms, on my local machine.