Skip to content
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

Fix sys.platform when cross-compiling with emscripten #14888

Merged
merged 2 commits into from
Apr 24, 2023

Conversation

ethanhs
Copy link
Collaborator

@ethanhs ethanhs commented Mar 13, 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).

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.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@ethanhs ethanhs mentioned this pull request Apr 24, 2023
@JelleZijlstra JelleZijlstra merged commit 31708f3 into master Apr 24, 2023
@JelleZijlstra JelleZijlstra deleted the fix-platform-cross-compile branch April 24, 2023 03:51
wesleywright pushed a commit that referenced this pull request 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emscripten wheels generate invalid "unreachable"
2 participants