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 emscripten action #1657

Merged
merged 4 commits into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion guide/src/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Ready to contribute? Here's how to setup maturin for local development.
```
7. Submit a pull request through the [GitHub website](https://github.com/PyO3/maturin/pulls).

We provides a pre-configured [dev container](https://containers.dev/) that could be used in [Github Codespaces](https://github.com/features/codespaces), [VSCode](https://code.visualstudio.com/), [JetBrains](https://www.jetbrains.com/remote-development/gateway/), [JuptyerLab](https://jupyterlab.readthedocs.io/en/stable/).
We provide a pre-configured [dev container](https://containers.dev/) that could be used in [Github Codespaces](https://github.com/features/codespaces), [VSCode](https://code.visualstudio.com/), [JetBrains](https://www.jetbrains.com/remote-development/gateway/), [JuptyerLab](https://jupyterlab.readthedocs.io/en/stable/).

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/pyo3/maturin?quickstart=1&machine=standardLinux32gb)

Expand Down
5 changes: 5 additions & 0 deletions guide/src/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ Options:

Use as `--extras=extra1,extra2`

--skip-install
Skip installation, only build the extension module inplace

Only works with mixed Rust/Python project layout

-q, --quiet
Do not print cargo log messages

Expand Down
7 changes: 5 additions & 2 deletions src/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,11 @@ jobs:\n",

// install pyodide-build for emscripten
if matches!(platform, Platform::Emscripten) {
// install stable pyodide-build
conf.push_str(" - run: pip install pyodide-build\n");
conf.push_str(" - shell: bash\n run: echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV\n");
conf.push_str(" - shell: bash\n run: |\n echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV\n");
// get the current python version for the installed pyodide-build
conf.push_str(" echo PYTHON_VERSION=$(pyodide config get python_version | cut -d '.' -f 1-2) >> $GITHUB_ENV\n");
conf.push_str(
" - uses: mymindstorm/setup-emsdk@v12
with:
Expand All @@ -268,7 +271,7 @@ jobs:\n",
let mut maturin_args = if is_abi3 || (is_bin && !setup_python) {
Vec::new()
} else if matches!(platform, Platform::Emscripten) {
vec!["-i".to_string(), "3.10".to_string()]
vec!["-i".to_string(), "${{ env.PYTHON_VERSION }}".to_string()]
} else {
vec!["--find-interpreter".to_string()]
};
Expand Down