-
Notifications
You must be signed in to change notification settings - Fork 21
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
Emscripten wheels generate invalid "unreachable" #62
Comments
cc @ethanhs |
I decided this would be better as a change to mypy's options: python/mypy#14888 |
wesleywright
pushed a commit
to python/mypy
that referenced
this issue
Apr 24, 2023
This is a workaround for correctly detecting the platform when building mypy with mypyc on the Emscripten platform. This fixes mypyc/mypy_mypyc-wheels#62. `pyodide build` overrides `sysconfig` for the host based on the target (confirmed on the pyodide matrix, [see also where the code is actually changed](https://github.com/pyodide/pyodide/blob/e835bf05ff4aa463024aaeb9689ae70ea5771314/pyodide-build/pyodide_build/pypabuild.py#L43-L50)). This should only change things when checking/building for the emscripten platform. There isn't really a cleaner workaround that I can think of unfortunately, the main issue is cross compiling is tricky with setuptools.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think this is probably not a bug in mypyc, more of how we build mypy with mypyc for Emscripten. When I set
MYPY_FORCE_COLOR=1
in the Emscripten environment, I get the following error:Which comes from this line in the color output detection code. The error is that the
sys.platform
is notemscripten
as it should be, so I believe the solution is that we need to override thesys.platform
when building Emscripten wheels. I want to check with pyodide folks first to make sure there isn't something else we should be doing however.The text was updated successfully, but these errors were encountered: