pip can't run inside of Pyodide because it needs to do stuff like make requests
that don't work inside the virtual environment. So the virtual environment bin
folder contains a python-host executable which is a symlink to the
sys.executable that created the virtual environment. The shebang for pip uses
python-host. But then when pip installs an executable it uses sys.executable to
create the shebang for the installed executable. If that is python-host then the
installed executable will run outside of Pyodide. So we need to patch
`sys.executable` to point to the Pyodide Python.
This switches to passing the source and build directories as arguments.
It adds an output-directory argument to pyodide build allowing us to
indicate where the output wheel should go independent of the build
directory. I also did some cleanup of the logic added in #3310
Add sourmash (Python + Rust extension, packaged with maturin) and missing pure-wheel deps (screed, bitstring, cachetools, deprecation).
After a couple of fixes in sourmash-bio/sourmash#2433 I managed to build it out-of-tree, would like to have it available here to make it easier to distribute (while PyPI doesn't support emscripten wheels).
v0.23.0 changed which binary files are needed (removed pyodide_py.tar and pyodide.asm.data and added python_stdlib.zip). The old files were removed from the exports but the new file was not added to the exports.
This adds the yarl package which is a requirement (with some Cython code) for the openai client library (#3588).
idna is a Pure python dependency of yarl.
This automatically apply `as_object_map` to the values of the map
when the values are "plain old objects". The behavior is slightly naive.
Hopefully it will satisfy most people who have requested this feature.
Set the MIME type for wheels and zip files to application/wasm to enable CDN compression. Also optionally disable compression in zip files and wheels to make the brotli compression by the CDN more efficient.
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
Resolves#3615. Things like `from` and `finally` are reserved keywords in Python and so `a.finally`
is a `SyntaxError`. This automatically reroutes `a.from_` on a `JsProxy` to refer to `a.from` so it
can be used reasonably conveniently from Python.
This fixes eval_code / eval_code_async / CodeRunner.run / CodeRunner.runAsync so that the defaults for globals and locals work as documented. Resolves#3578.
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>