auditwheel-emscripten
auditwheel-like tool for wheels targeting Emscripten platform
$ pip install auditwheel-emscripten
What is this?
auditwheel-emscripten is a tiny tool to facilitate the creation of Python wheel packages for Emscripten. auditwheel-emscripten is originally created for Pyodide, but it can be used in any other projects that target Python-in-the-browser using Emscripten.
pyodide auditwheel show: shows external shared libraries that the wheel depends on.pyodide auditwheel repair: copies these external shared libraries into the wheel itself, mangles copied names with a source-content hash, and updates the RPATH of the WASM module correspondingly.
Usage (CLI)
Usage: pyodide auditwheel [OPTIONS] COMMAND [ARGS]...
Auditwheel-like tool for emscripten wheels and shared libraries.
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ copy [Deprecated] Copy shared libraries to the wheel directory. Works same as repair. Use repair instead. │
│ exports Show exports of a wheel or a shared library file. │
│ imports Show imports of a wheel or a shared library file. │
│ repair Repair a wheel file: copy shared libraries to the wheel directory. │
│ show Show shared library dependencies of a wheel or a shared library file. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
$ pyodide auditwheel show shapely-2.0.7-cp313-cp313-pyodide_2025_0_wasm32.whl
shapely/speedups/_speedups.cpython-310-wasm32-emscripten.so:
libgeos_c.so
shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so:
libgeos_c.so
$ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so> shapely-2.0.7-cp313-cp313-pyodide_2025_0_wasm32.whl
shapely/lib.cpython-313-wasm32-emscripten.so:
libgeos_c-a1b2c3d4.so => shapely.libs/libgeos_c-a1b2c3d4.so
shapely/_geometry_helpers.cpython-313-wasm32-emscripten.so:
libgeos_c-a1b2c3d4.so => shapely.libs/libgeos_c-a1b2c3d4.so
shapely/_geos.cpython-313-wasm32-emscripten.so:
libgeos_c-a1b2c3d4.so => shapely.libs/libgeos_c-a1b2c3d4.so
shapely.libs/libgeos-e5f6a7b8.so:
shapely.libs/libgeos_c-a1b2c3d4.so:
libgeos-e5f6a7b8.so => shapely.libs/libgeos-e5f6a7b8.so
Usage (API)
Listing shared library dependencies of a wheel file:
from auditwheel_emscripten import show
libs = show("Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl")
print(libs)
# {'shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so': ['libgeos_c.so'], 'shapely/speedups/_speedups.cpython-310-wasm32-emscripten.so': ['libgeos_c.so']}
Copying shared libraries to the wheel:
from auditwheel_emscripten import repair, show
repaired_wheel = repair(
"Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl",
libdir="/path/where/shared/libraries/are/located",
outdir="/path/to/output/directory",
)
libs = show(repaired_wheel)
print(libs)
# {'Shapely.libs/libgeos-e5f6a7b8.so.3.10.3': [], 'Shapely.libs/libgeos_c-a1b2c3d4.so': ['libgeos-e5f6a7b8.so.3.10.3'], 'shapely/speedups/_speedups.cpython-310-wasm32-emscripten.so': ['libgeos_c-a1b2c3d4.so'], 'shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so': ['libgeos_c-a1b2c3d4.so']}
Implementation details / limitations
Dynamic linking in Emscripten
Dynamic linking is not in the WebAssembly specification, but Emscripten has its own dynamic linking support, which is required for building Python wheels targeting Emscripten platform.
This tool is based on:
- Loosely documented Emscripten dynamic linking specification: https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md
- Emscripten's internal utility for inspecting WASM module: https://github.com/emscripten-core/emscripten/blob/main/tools/webassembly.py
- Emscripten dylink implementation: https://github.com/emscripten-core/emscripten/blob/main/src/library_dylink.js
auditwheel vs auditwheel-emscripten
auditwheel is a tool that helps repair and modify Python wheels (pre-compiled packages)
to be compatible with a wide range of Linux distributions.
It does this by copying external shared libraries into the wheel and
repairing the RPATH (a file path that is used to locate shared libraries at runtime)
of the ELF binary so that the Linux operating system can locate the library when the program is run.
auditwheel-emscripten is a variation of auditwheel that is specifically designed
to work with Emscripten-generated WebAssembly (WASM) modules.
Like auditwheel, it copies the required shared libraries into the wheel and patches the runtime
search path of each WASM module so the dynamic linker can locate them at runtime.
It does this by writing a RUNTIME_PATH entry (using $ORIGIN-relative paths) into the dylink.0
custom section of each module, which is the Emscripten equivalent of the ELF RPATH.
Pyodide's dynamic linker reads this section to resolve library locations.
Unlike auditwheel on Linux, auditwheel-emscripten does not enforce compatibility between
Emscripten versions, since no stable ABI exists for Emscripten-compiled shared libraries.
Metadata
Release files for auditwheel-emscripten 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| auditwheel_emscripten-0.3.0.tar.gz | 5.8 MB | With provenance | Details for auditwheel_emscripten-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| auditwheel_emscripten-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for auditwheel_emscripten-0.3.0-py3-none-any.whl |
Total release size: 5.9 MB
Release files / auditwheel_emscripten-0.3.0.tar.gz
| Download URL | auditwheel_emscripten-0.3.0.tar.gz |
|---|---|
| Size | 5.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a58fbd4adc7573548146ea64e73b3f603cbb52c7f9269cdf711818c0e9d69854
|
|
BLAKE2b-256 checksum How to use checksums |
0c8717c9ff3abc9f0e031a37662aabac7ba9b9d526429579d58d8d6e308e5d13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logRelease files / auditwheel_emscripten-0.3.0-py3-none-any.whl
| Download URL | auditwheel_emscripten-0.3.0-py3-none-any.whl |
|---|---|
| Size | 34.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e6e731243d65560a9c7daccd9159cc2b6bb4e99a1625d9e5e44ab2b415a280e
|
|
BLAKE2b-256 checksum How to use checksums |
302e771cb7d23bbc2fc5ef31c57f84542b27a36ad3a199203f6657326d30b095
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logSecurity for auditwheel-emscripten 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for auditwheel_emscripten-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.