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

#11 Add GH actions for build and publish of python #35

Merged
merged 8 commits into from
Jan 18, 2023

Conversation

assambar
Copy link
Contributor

@assambar assambar commented Jan 18, 2023

Python's standard libraries are not part of the python binary.

Therefore we are publishing a python-aio-3.11.1.zip that contains both the wasm binary and the python311.zip with the standard libraries. Also the python311.zip is placed in its built-in PYTHONPATH location in usr/local/lib

python-aio-3.11.1/
├── bin
│   └── python-3.11.1.wasm
└── usr
    └── local
        └── lib
            └── python311.zip

Running the interpreter will require that the usr folder is pre-opened as /usr in the WASM sandbox.

wasmtime run --mapdir /::. bin/python-3.11.1.wasm -- -c "print('Hello')"
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Hello

Note: while python prints the "platform (in|)dependent libraries" warning to stderr it works perfectly fine. So I suggest we debug this nuisance separately.

Note: python failed to build with wasi-sdk-16, but I could not solve this quickly, so re-added the wasi-sdk-16 builder for now.

@assambar
Copy link
Contributor Author

The release action has been tested here - https://github.com/assambar/webassembly-language-runtimes/actions

Copy link
Contributor

@ereslibre ereslibre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good, thanks @assambar! Some comments.

.github/workflows/release-python.yaml Outdated Show resolved Hide resolved
.github/workflows/build-python.yaml Show resolved Hide resolved
.github/workflows/release-python.yaml Outdated Show resolved Hide resolved
python/v3.11.1/wl-build.sh Show resolved Hide resolved
@assambar assambar force-pushed the 11-python-automation branch from c22215e to 576b47d Compare January 18, 2023 22:12
@assambar assambar merged commit f23f3f3 into main Jan 18, 2023
@assambar assambar deleted the 11-python-automation branch January 18, 2023 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants