https://github.com/henryiii/docker-pyodide-build
Dockerfile for pyodide build
https://github.com/henryiii/docker-pyodide-build
Last synced: about 2 months ago
JSON representation
Dockerfile for pyodide build
- Host: GitHub
- URL: https://github.com/henryiii/docker-pyodide-build
- Owner: henryiii
- Created: 2023-04-25T16:38:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-05T20:50:33.000Z (about 2 years ago)
- Last Synced: 2025-02-10T11:46:46.235Z (3 months ago)
- Language: Dockerfile
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerfile for pyodide build
Useful on macOS, where it's currently broken.Build with:
```bash
docker build . -t pyodide-build
```Run with:
```bash
docker run -v $PWD:/pkg -w /pkg --rm -it pyodide-build
```To activate environment with `pyodide build`:
```bash
. /venv-host/bin/activate
```Then you can build with:
```bash
pyodide build
```To run tests.
```bash
deactivate
. /venv-pyodide/bin/activate
pytest
```## Guides
Getting into the build environment:
> So what you want to do is: Set `symlink_dir_str` to a constant absolute path instead of the temp directory
> [here](https://github.com/pyodide/pyodide/blob/main/pyodide-build/pyodide_build/pypabuild.py#L208)
> then the compilers in that directory will work the same as in the build
> so you should be able to reproduce the linker error.
> You should also add that directory at the beginning of your path.
> You probably also want to keep the virtual environment around.
> [by uncommenting this line])https://github.com/pyodide/pyodide/blob/main/pyodide-build/pyodide_build/pypabuild.py#L99).
> If you source the activate script from the build virtual environment and add
> the compiler symlinks directory to the beginning of your path
> it should be possible to reproduce a lot of the build.