auditwheel-emscripten 0.0.16__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- auditwheel_emscripten-0.2.0/.github/workflows/deploy.yml +71 -0
- auditwheel_emscripten-0.2.0/.github/workflows/test.yml +33 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/.pre-commit-config.yaml +15 -9
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/CHANGELOG.md +26 -10
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/PKG-INFO +26 -23
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/README.md +22 -19
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/__init__.py +2 -2
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/cli/main.py +53 -7
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/emscripten_tools/webassembly.py +10 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/module.py +36 -5
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/repair.py +20 -12
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/show.py +31 -7
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/wheel_utils.py +22 -9
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/pyproject.toml +2 -2
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_repair.py +42 -2
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_show.py +40 -2
- auditwheel_emscripten-0.2.0/uv.lock +200 -0
- auditwheel_emscripten-0.0.16/.github/workflows/deploy.yml +0 -50
- auditwheel_emscripten-0.0.16/.github/workflows/test.yml +0 -25
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/.flake8 +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/.gitignore +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/LICENSE +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/cli/__init__.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/emscripten_tools/__init__.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/emscripten_tools/diagnostics.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/emscripten_tools/utils.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/exports.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/function_type.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/imports.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/lib_utils.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/py.typed +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/wasm_utils.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/paths.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/elf +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/galpy-1.8.0-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libcrypto.so +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libgeos.so +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libgeos.so.3.10.3 +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libgeos_c.so +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libgeos_c.so.1 +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libgeos_c.so.1.16.1 +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libgeos_c.wasm +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/libssl.so +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_data/numpy-1.22.4-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_exports.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_function_type.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_imports.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_utils.py +0 -0
- {auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/test/test_wheel_utils.py +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: deploy
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: "0 3 * * 1"
|
|
9
|
+
|
|
10
|
+
permissions: {}
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: main-${{ github.head_ref || github.run_id }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
23
|
+
with:
|
|
24
|
+
persist-credentials: false
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
27
|
+
|
|
28
|
+
- name: Install requirements and build wheel
|
|
29
|
+
shell: bash -l {0}
|
|
30
|
+
run: |
|
|
31
|
+
python -m pip install build
|
|
32
|
+
python -m build .
|
|
33
|
+
|
|
34
|
+
- name: Store the distribution packages
|
|
35
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
36
|
+
with:
|
|
37
|
+
name: python-package-distributions
|
|
38
|
+
path: dist/
|
|
39
|
+
if-no-files-found: error
|
|
40
|
+
|
|
41
|
+
publish-to-pypi:
|
|
42
|
+
name: Publish Python 🐍 distribution 📦 to PyPI
|
|
43
|
+
needs:
|
|
44
|
+
- build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
47
|
+
environment:
|
|
48
|
+
name: pypi
|
|
49
|
+
url: https://pypi.org/p/auditwheel-emscripten
|
|
50
|
+
permissions:
|
|
51
|
+
contents: write
|
|
52
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
53
|
+
attestations: write
|
|
54
|
+
steps:
|
|
55
|
+
- name: Download all the dists
|
|
56
|
+
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
|
57
|
+
with:
|
|
58
|
+
name: python-package-distributions
|
|
59
|
+
path: dist/
|
|
60
|
+
merge-multiple: true
|
|
61
|
+
|
|
62
|
+
- name: Generate artifact attestation(s)
|
|
63
|
+
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
|
|
64
|
+
with:
|
|
65
|
+
subject-path: |
|
|
66
|
+
dist/*.tar.gz
|
|
67
|
+
dist/*.whl
|
|
68
|
+
|
|
69
|
+
- name: Publish distribution 📦 to PyPI
|
|
70
|
+
if: github.event_name == 'release' && github.event.action == 'published'
|
|
71
|
+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions: {}
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: main-${{ github.head_ref || github.run_id }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
22
|
+
with:
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: python -m pip install -e ".[test]"
|
|
31
|
+
|
|
32
|
+
- name: Run tests
|
|
33
|
+
run: pytest -svra
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
exclude: (^auditwheel_emscripten/emscripten_tools/)
|
|
2
2
|
default_language_version:
|
|
3
|
-
python: "3.
|
|
3
|
+
python: "3.13"
|
|
4
4
|
repos:
|
|
5
5
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
-
rev: "
|
|
6
|
+
rev: "v5.0.0"
|
|
7
7
|
hooks:
|
|
8
8
|
- id: check-case-conflict
|
|
9
9
|
- id: check-merge-conflict
|
|
@@ -16,31 +16,31 @@ repos:
|
|
|
16
16
|
- id: trailing-whitespace
|
|
17
17
|
|
|
18
18
|
- repo: https://github.com/asottile/pyupgrade
|
|
19
|
-
rev: "v3.
|
|
19
|
+
rev: "v3.19.1"
|
|
20
20
|
hooks:
|
|
21
21
|
- id: pyupgrade
|
|
22
|
-
args: ["--
|
|
22
|
+
args: ["--py312-plus"]
|
|
23
23
|
|
|
24
24
|
- repo: https://github.com/hadialqattan/pycln
|
|
25
|
-
rev: "v2.
|
|
25
|
+
rev: "v2.5.0"
|
|
26
26
|
hooks:
|
|
27
27
|
- id: pycln
|
|
28
28
|
args: [--config=pyproject.toml]
|
|
29
29
|
stages: [manual]
|
|
30
30
|
|
|
31
31
|
- repo: https://github.com/psf/black
|
|
32
|
-
rev: "
|
|
32
|
+
rev: "25.1.0"
|
|
33
33
|
hooks:
|
|
34
34
|
- id: black
|
|
35
35
|
|
|
36
36
|
- repo: https://github.com/pycqa/flake8
|
|
37
|
-
rev: "7.
|
|
37
|
+
rev: "7.1.2"
|
|
38
38
|
hooks:
|
|
39
39
|
- id: flake8
|
|
40
40
|
additional_dependencies: [flake8-bugbear]
|
|
41
41
|
|
|
42
42
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
43
|
-
rev: "v1.
|
|
43
|
+
rev: "v1.15.0"
|
|
44
44
|
hooks:
|
|
45
45
|
- id: mypy
|
|
46
46
|
exclude: auditwheel_emscripten/emscripten_tools
|
|
@@ -51,7 +51,13 @@ repos:
|
|
|
51
51
|
- id: shellcheck
|
|
52
52
|
|
|
53
53
|
- repo: https://github.com/codespell-project/codespell
|
|
54
|
-
rev: "v2.
|
|
54
|
+
rev: "v2.4.1"
|
|
55
55
|
hooks:
|
|
56
56
|
- id: codespell
|
|
57
57
|
args: ["-L", "te,slowy,aray,ba,nd,classs,crate,feld,lits"]
|
|
58
|
+
|
|
59
|
+
- repo: https://github.com/woodruffw/zizmor-pre-commit
|
|
60
|
+
rev: "v1.5.2"
|
|
61
|
+
hooks:
|
|
62
|
+
- id: zizmor
|
|
63
|
+
args: ["--pedantic"]
|
|
@@ -7,19 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The output format of `pyodide auditwheel show` has been simplified to be more `ldd`-like. It also shows the location of the dependencies in the wheel
|
|
13
|
+
using the runtime path of the shared libraries.
|
|
14
|
+
|
|
15
|
+
- `pyodide auditwheel show` now accepts `-r`, `--with-runtime-paths` option to show the runtime paths of the shared libraries in the wheel.
|
|
16
|
+
|
|
17
|
+
- `auditwheel.show()` function now returns the runtime paths of the shared libraries in the wheel as well.
|
|
18
|
+
|
|
19
|
+
## [0.1.0] - 2025-04-04
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- `auditwheel repair` command now updates the DYLINK RPATH section of the wasm module.
|
|
24
|
+
([#41](https://github.com/pyodide/auditwheel-emscripten/pull/41))
|
|
25
|
+
|
|
10
26
|
## [0.0.16] - 2024-07-05
|
|
11
27
|
|
|
12
28
|
### Fixed
|
|
13
29
|
|
|
14
30
|
- Fixed incorrect extra dependency for typer
|
|
15
|
-
([#32](https://github.com/
|
|
31
|
+
([#32](https://github.com/pyodide/auditwheel-emscripten/pull/32))
|
|
16
32
|
|
|
17
33
|
## [0.0.15] - 2024-06-17
|
|
18
34
|
|
|
19
35
|
### Fixed
|
|
20
36
|
|
|
21
37
|
- Support Pyodide>=0.26.0 wheels that has "pyodide" platform tag.
|
|
22
|
-
([#31](https://github.com/
|
|
38
|
+
([#31](https://github.com/pyodide/auditwheel-emscripten/pull/31))
|
|
23
39
|
|
|
24
40
|
## [0.0.14] - 2023-12-23
|
|
25
41
|
|
|
@@ -28,19 +44,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
28
44
|
- Changed the behavior of the `repair` command. It does not update `needed` section anymore
|
|
29
45
|
and only copies the shared libraries to the wheel.
|
|
30
46
|
Also, `copy` command is deprecated in favor of `repair`.
|
|
31
|
-
([#25](https://github.com/
|
|
47
|
+
([#25](https://github.com/pyodide/auditwheel-emscripten/pull/25))
|
|
32
48
|
|
|
33
49
|
## [0.0.13] - 2023.06.08
|
|
34
50
|
|
|
35
51
|
- Added py.typed file.
|
|
36
|
-
([#16](https://github.com/
|
|
52
|
+
([#16](https://github.com/pyodide/auditwheel-emscripten/pull/16))
|
|
37
53
|
|
|
38
54
|
## [0.0.12] - 2023.02.13
|
|
39
55
|
|
|
40
56
|
### Fixed
|
|
41
57
|
|
|
42
58
|
- Added license file to the distribution.
|
|
43
|
-
([#10](https://github.com/
|
|
59
|
+
([#10](https://github.com/pyodide/auditwheel-emscripten/pull/10))
|
|
44
60
|
|
|
45
61
|
## [0.0.11] - 2023.02.06
|
|
46
62
|
|
|
@@ -48,26 +64,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
48
64
|
|
|
49
65
|
- Added `--show-type` option to `exports` and `imports` command, which will
|
|
50
66
|
show the type of the functions in the output.
|
|
51
|
-
([#9](https://github.com/
|
|
67
|
+
([#9](https://github.com/pyodide/auditwheel-emscripten/pull/9))
|
|
52
68
|
|
|
53
69
|
## [0.0.10] - 2023.01.26
|
|
54
70
|
|
|
55
71
|
### Changed
|
|
56
72
|
|
|
57
73
|
- Removed extra message from CLI commands.
|
|
58
|
-
([#8](https://github.com/
|
|
74
|
+
([#8](https://github.com/pyodide/auditwheel-emscripten/pull/8))
|
|
59
75
|
- Changed the output format of `exports` and `imports` CLI command in order to
|
|
60
76
|
make it easier to parse with `grep`.
|
|
61
|
-
([#8](https://github.com/
|
|
77
|
+
([#8](https://github.com/pyodide/auditwheel-emscripten/pull/8))
|
|
62
78
|
|
|
63
79
|
## [0.0.9] - 2022.12.20
|
|
64
80
|
|
|
65
81
|
### Fixed
|
|
66
82
|
|
|
67
83
|
- `pyodide auditwheel show` now will work on modules with .wasm suffix
|
|
68
|
-
([#7](https://github.com/
|
|
84
|
+
([#7](https://github.com/pyodide/auditwheel-emscripten/pull/7))
|
|
69
85
|
|
|
70
86
|
### Changed
|
|
71
87
|
|
|
72
88
|
- Changed the CLI entry point name from `pyodide audit` to `pyodide auditwheel`
|
|
73
|
-
([#5](https://github.com/
|
|
89
|
+
([#5](https://github.com/pyodide/auditwheel-emscripten/pull/5))
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: auditwheel_emscripten
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: auditwheel-like tool for Pyodide
|
|
5
|
-
Project-URL: Home, https://github.com/
|
|
5
|
+
Project-URL: Home, https://github.com/pyodide/auditwheel-emscripten
|
|
6
6
|
Author-email: Gyeongjae Choi <def6488@gmail.com>
|
|
7
7
|
License: Mozilla Public License Version 2.0
|
|
8
8
|
==================================
|
|
@@ -378,7 +378,7 @@ License: Mozilla Public License Version 2.0
|
|
|
378
378
|
This Source Code Form is "Incompatible With Secondary Licenses", as
|
|
379
379
|
defined by the Mozilla Public License, v. 2.0.
|
|
380
380
|
License-File: LICENSE
|
|
381
|
-
Requires-Python: >=3.
|
|
381
|
+
Requires-Python: >=3.12
|
|
382
382
|
Requires-Dist: leb128
|
|
383
383
|
Requires-Dist: packaging
|
|
384
384
|
Requires-Dist: pyodide-cli
|
|
@@ -391,7 +391,7 @@ Description-Content-Type: text/markdown
|
|
|
391
391
|
# auditwheel-emscripten
|
|
392
392
|
|
|
393
393
|
[](https://pypi.org/project/auditwheel-emscripten/)
|
|
394
|
-

|
|
395
395
|
|
|
396
396
|
auditwheel-like tool for wheels targeting Emscripten platform
|
|
397
397
|
|
|
@@ -407,7 +407,7 @@ auditwheel-emscripten is a tiny tool to facilitate the creation of Python wheel
|
|
|
407
407
|
Python-in-the-browser using Emscripten.
|
|
408
408
|
|
|
409
409
|
- `pyodide auditwheel show`: shows external shared libraries that the wheel depends on.
|
|
410
|
-
- `pyodide auditwheel repair`: copies these external shared libraries into the wheel itself.
|
|
410
|
+
- `pyodide auditwheel repair`: copies these external shared libraries into the wheel itself, and update the RPATH of the WASM module correspondingly.
|
|
411
411
|
|
|
412
412
|
## Usage (CLI)
|
|
413
413
|
|
|
@@ -429,26 +429,29 @@ Python-in-the-browser using Emscripten.
|
|
|
429
429
|
```
|
|
430
430
|
|
|
431
431
|
```sh
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
│ 'shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so': ['libgeos_c.so']
|
|
439
|
-
}
|
|
432
|
+
$ pyodide auditwheel show shapely-2.0.7-cp313-cp313-pyodide_2025_0_wasm32.whl
|
|
433
|
+
shapely/speedups/_speedups.cpython-310-wasm32-emscripten.so:
|
|
434
|
+
libgeos_c.so
|
|
435
|
+
|
|
436
|
+
shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so:
|
|
437
|
+
libgeos_c.so
|
|
440
438
|
```
|
|
441
439
|
|
|
442
440
|
```sh
|
|
443
|
-
$ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so>
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
441
|
+
$ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so> shapely-2.0.7-cp313-cp313-pyodide_2025_0_wasm32.whl
|
|
442
|
+
shapely/lib.cpython-313-wasm32-emscripten.so:
|
|
443
|
+
libgeos_c.so => shapely.libs/libgeos_c.so
|
|
444
|
+
|
|
445
|
+
shapely/_geometry_helpers.cpython-313-wasm32-emscripten.so:
|
|
446
|
+
libgeos_c.so => shapely.libs/libgeos_c.so
|
|
447
|
+
|
|
448
|
+
shapely/_geos.cpython-313-wasm32-emscripten.so:
|
|
449
|
+
libgeos_c.so => shapely.libs/libgeos_c.so
|
|
450
|
+
|
|
451
|
+
shapely.libs/libgeos.so:
|
|
452
|
+
|
|
453
|
+
shapely.libs/libgeos_c.so:
|
|
454
|
+
libgeos.so => shapely.libs/libgeos.so
|
|
452
455
|
```
|
|
453
456
|
|
|
454
457
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# auditwheel-emscripten
|
|
2
2
|
|
|
3
3
|
[](https://pypi.org/project/auditwheel-emscripten/)
|
|
4
|
-

|
|
5
5
|
|
|
6
6
|
auditwheel-like tool for wheels targeting Emscripten platform
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@ auditwheel-emscripten is a tiny tool to facilitate the creation of Python wheel
|
|
|
17
17
|
Python-in-the-browser using Emscripten.
|
|
18
18
|
|
|
19
19
|
- `pyodide auditwheel show`: shows external shared libraries that the wheel depends on.
|
|
20
|
-
- `pyodide auditwheel repair`: copies these external shared libraries into the wheel itself.
|
|
20
|
+
- `pyodide auditwheel repair`: copies these external shared libraries into the wheel itself, and update the RPATH of the WASM module correspondingly.
|
|
21
21
|
|
|
22
22
|
## Usage (CLI)
|
|
23
23
|
|
|
@@ -39,26 +39,29 @@ Python-in-the-browser using Emscripten.
|
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
```sh
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
│ 'shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so': ['libgeos_c.so']
|
|
49
|
-
}
|
|
42
|
+
$ pyodide auditwheel show shapely-2.0.7-cp313-cp313-pyodide_2025_0_wasm32.whl
|
|
43
|
+
shapely/speedups/_speedups.cpython-310-wasm32-emscripten.so:
|
|
44
|
+
libgeos_c.so
|
|
45
|
+
|
|
46
|
+
shapely/vectorized/_vectorized.cpython-310-wasm32-emscripten.so:
|
|
47
|
+
libgeos_c.so
|
|
50
48
|
```
|
|
51
49
|
|
|
52
50
|
```sh
|
|
53
|
-
$ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
$ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so> shapely-2.0.7-cp313-cp313-pyodide_2025_0_wasm32.whl
|
|
52
|
+
shapely/lib.cpython-313-wasm32-emscripten.so:
|
|
53
|
+
libgeos_c.so => shapely.libs/libgeos_c.so
|
|
54
|
+
|
|
55
|
+
shapely/_geometry_helpers.cpython-313-wasm32-emscripten.so:
|
|
56
|
+
libgeos_c.so => shapely.libs/libgeos_c.so
|
|
57
|
+
|
|
58
|
+
shapely/_geos.cpython-313-wasm32-emscripten.so:
|
|
59
|
+
libgeos_c.so => shapely.libs/libgeos_c.so
|
|
60
|
+
|
|
61
|
+
shapely.libs/libgeos.so:
|
|
62
|
+
|
|
63
|
+
shapely.libs/libgeos_c.so:
|
|
64
|
+
libgeos.so => shapely.libs/libgeos.so
|
|
62
65
|
```
|
|
63
66
|
|
|
64
67
|
|
{auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/__init__.py
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from .exports import get_exports
|
|
2
2
|
from .imports import get_imports
|
|
3
|
-
from .repair import copylib, repair,
|
|
3
|
+
from .repair import copylib, repair, resolve_sharedlib, modify_runtime_path
|
|
4
4
|
from .show import show, show_dylib, show_wheel
|
|
5
5
|
|
|
6
6
|
__all__ = [
|
|
7
7
|
"repair",
|
|
8
|
-
"repair_extracted",
|
|
9
8
|
"resolve_sharedlib",
|
|
9
|
+
"modify_runtime_path",
|
|
10
10
|
"show",
|
|
11
11
|
"show_wheel",
|
|
12
12
|
"show_dylib",
|
{auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/cli/main.py
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
import typer
|
|
4
|
-
from rich.pretty import pprint
|
|
5
4
|
|
|
6
5
|
from .. import function_type, get_exports, get_imports, repair, show
|
|
6
|
+
from ..show import locate_dependency
|
|
7
7
|
from ..wheel_utils import unpack_if_wheel
|
|
8
8
|
|
|
9
9
|
app = typer.Typer()
|
|
@@ -14,18 +14,55 @@ def main():
|
|
|
14
14
|
"""Auditwheel-like tool for emscripten wheels and shared libraries."""
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
def print_dylib(
|
|
18
|
+
library: str,
|
|
19
|
+
deps: list[str],
|
|
20
|
+
runtime_paths: list[str],
|
|
21
|
+
libraries: list[str],
|
|
22
|
+
show_runtime_paths: bool = False,
|
|
23
|
+
):
|
|
24
|
+
"""
|
|
25
|
+
Print shared library dependencies and runtime paths.
|
|
26
|
+
The output looks similar to the output of `ldd`
|
|
27
|
+
"""
|
|
28
|
+
print(f"{library}:")
|
|
29
|
+
|
|
30
|
+
for dep in deps:
|
|
31
|
+
line = f"\t{dep:>10}"
|
|
32
|
+
deppath = locate_dependency(library, dep, libraries, runtime_paths)
|
|
33
|
+
if deppath:
|
|
34
|
+
line += f" => {deppath}"
|
|
35
|
+
print(line)
|
|
36
|
+
|
|
37
|
+
if show_runtime_paths and runtime_paths:
|
|
38
|
+
print("\n\tRuntime search paths:")
|
|
39
|
+
for path in runtime_paths:
|
|
40
|
+
print(f"\t {path}")
|
|
41
|
+
|
|
42
|
+
print()
|
|
43
|
+
|
|
44
|
+
|
|
17
45
|
@app.command("show")
|
|
18
46
|
def _show(
|
|
19
47
|
wheel_or_so_file: Path = typer.Argument(
|
|
20
48
|
..., help="Path to wheel or a shared library file."
|
|
21
|
-
)
|
|
49
|
+
),
|
|
50
|
+
show_runtime_paths: bool = typer.Option(
|
|
51
|
+
False,
|
|
52
|
+
"-r",
|
|
53
|
+
"--with-runtime-paths",
|
|
54
|
+
help="Show runtime paths.",
|
|
55
|
+
),
|
|
22
56
|
):
|
|
23
57
|
"""
|
|
24
58
|
Show shared library dependencies of a wheel or a shared library file.
|
|
25
59
|
"""
|
|
26
60
|
try:
|
|
27
|
-
|
|
28
|
-
|
|
61
|
+
libraries = show(wheel_or_so_file)
|
|
62
|
+
for lib, (deps, runtime_paths) in libraries.items():
|
|
63
|
+
print_dylib(
|
|
64
|
+
lib, deps, runtime_paths, list(libraries.keys()), show_runtime_paths
|
|
65
|
+
)
|
|
29
66
|
except Exception as e:
|
|
30
67
|
raise e
|
|
31
68
|
|
|
@@ -41,6 +78,12 @@ def _repair(
|
|
|
41
78
|
None,
|
|
42
79
|
help="Directory to output repaired wheel or shared library. (default: overwrite the input file)",
|
|
43
80
|
),
|
|
81
|
+
show_runtime_paths: bool = typer.Option(
|
|
82
|
+
False,
|
|
83
|
+
"-r",
|
|
84
|
+
"--with-runtime-paths",
|
|
85
|
+
help="Show runtime paths.",
|
|
86
|
+
),
|
|
44
87
|
):
|
|
45
88
|
"""
|
|
46
89
|
Repair a wheel file: copy shared libraries to the wheel directory.
|
|
@@ -50,10 +93,13 @@ def _repair(
|
|
|
50
93
|
wheel_file,
|
|
51
94
|
libdir,
|
|
52
95
|
output_dir,
|
|
53
|
-
|
|
96
|
+
modify_rpath=True,
|
|
54
97
|
)
|
|
55
|
-
|
|
56
|
-
|
|
98
|
+
libraries = show(repaired_wheel)
|
|
99
|
+
for lib, (deps, runtime_paths) in libraries.items():
|
|
100
|
+
print_dylib(
|
|
101
|
+
lib, deps, runtime_paths, list(libraries.keys()), show_runtime_paths
|
|
102
|
+
)
|
|
57
103
|
except RuntimeError as e:
|
|
58
104
|
raise e
|
|
59
105
|
|
|
@@ -157,6 +157,7 @@ class DylinkType(IntEnum):
|
|
|
157
157
|
NEEDED = 2
|
|
158
158
|
EXPORT_INFO = 3
|
|
159
159
|
IMPORT_INFO = 4
|
|
160
|
+
RUNTIME_PATH = 5
|
|
160
161
|
|
|
161
162
|
|
|
162
163
|
class InvalidWasmError(BaseException):
|
|
@@ -178,6 +179,7 @@ Dylink = namedtuple(
|
|
|
178
179
|
"needed",
|
|
179
180
|
"export_info",
|
|
180
181
|
"import_info",
|
|
182
|
+
"runtime_paths",
|
|
181
183
|
],
|
|
182
184
|
)
|
|
183
185
|
Table = namedtuple("Table", ["elem_type", "limits"])
|
|
@@ -332,6 +334,7 @@ class Module:
|
|
|
332
334
|
needed = []
|
|
333
335
|
export_info = {}
|
|
334
336
|
import_info = {}
|
|
337
|
+
runtime_paths = []
|
|
335
338
|
self.read_string() # name
|
|
336
339
|
|
|
337
340
|
if dylink_section.name == "dylink":
|
|
@@ -378,6 +381,12 @@ class Module:
|
|
|
378
381
|
import_info.setdefault(module, {})
|
|
379
382
|
import_info[module][field] = flags
|
|
380
383
|
count -= 1
|
|
384
|
+
elif subsection_type == DylinkType.RUNTIME_PATH:
|
|
385
|
+
count = self.read_uleb()
|
|
386
|
+
while count:
|
|
387
|
+
rpath = self.read_string()
|
|
388
|
+
runtime_paths.append(rpath)
|
|
389
|
+
count -= 1
|
|
381
390
|
else:
|
|
382
391
|
print(f"unknown subsection: {subsection_type}")
|
|
383
392
|
# ignore unknown subsections
|
|
@@ -395,6 +404,7 @@ class Module:
|
|
|
395
404
|
needed,
|
|
396
405
|
export_info,
|
|
397
406
|
import_info,
|
|
407
|
+
runtime_paths,
|
|
398
408
|
)
|
|
399
409
|
|
|
400
410
|
@memoize
|
{auditwheel_emscripten-0.0.16 → auditwheel_emscripten-0.2.0}/auditwheel_emscripten/module.py
RENAMED
|
@@ -76,6 +76,17 @@ class ModuleWritable(webassembly.Module):
|
|
|
76
76
|
buf.extend(leb128.u.encode(len(subsection_buf)))
|
|
77
77
|
buf.extend(subsection_buf)
|
|
78
78
|
|
|
79
|
+
# 5. RUNTIME_PATH
|
|
80
|
+
subsection_buf = bytearray()
|
|
81
|
+
subsection_buf.extend(leb128.u.encode(len(dylink.runtime_paths)))
|
|
82
|
+
for path in dylink.runtime_paths:
|
|
83
|
+
subsection_buf.extend(leb128.u.encode(len(path.encode())))
|
|
84
|
+
subsection_buf += path.encode()
|
|
85
|
+
|
|
86
|
+
buf.extend(leb128.u.encode(DylinkType.RUNTIME_PATH))
|
|
87
|
+
buf.extend(leb128.u.encode(len(subsection_buf)))
|
|
88
|
+
buf.extend(subsection_buf)
|
|
89
|
+
|
|
79
90
|
section_buf = bytearray()
|
|
80
91
|
|
|
81
92
|
# custom section
|
|
@@ -115,6 +126,29 @@ class ModuleWritable(webassembly.Module):
|
|
|
115
126
|
|
|
116
127
|
return patched_module
|
|
117
128
|
|
|
129
|
+
def patch_runtime_path(self, runtime_path: Path) -> bytes:
|
|
130
|
+
curfile = Path(self.filename).resolve()
|
|
131
|
+
|
|
132
|
+
relpath = os.path.relpath(runtime_path, curfile.parent)
|
|
133
|
+
if relpath == ".":
|
|
134
|
+
realpath_with_prefix = "$ORIGIN"
|
|
135
|
+
else:
|
|
136
|
+
realpath_with_prefix = "$ORIGIN/" + Path(relpath).as_posix()
|
|
137
|
+
|
|
138
|
+
dylink_section: webassembly.Dylink = self.parse_dylink_section()
|
|
139
|
+
runtime_paths = dylink_section.runtime_paths
|
|
140
|
+
|
|
141
|
+
if realpath_with_prefix not in runtime_paths:
|
|
142
|
+
runtime_paths = runtime_paths + [realpath_with_prefix]
|
|
143
|
+
|
|
144
|
+
patched_dylink_section = dylink_section._replace(
|
|
145
|
+
runtime_paths=runtime_paths,
|
|
146
|
+
)
|
|
147
|
+
encoded_dylink_section = self.encode_dylink_section(patched_dylink_section)
|
|
148
|
+
patched_module = self.patch_dylink(encoded_dylink_section)
|
|
149
|
+
|
|
150
|
+
return patched_module
|
|
151
|
+
|
|
118
152
|
|
|
119
153
|
def parse_dylink_section(dylib: Path):
|
|
120
154
|
"""
|
|
@@ -126,12 +160,9 @@ def parse_dylink_section(dylib: Path):
|
|
|
126
160
|
return dylink
|
|
127
161
|
|
|
128
162
|
|
|
129
|
-
def
|
|
130
|
-
"""
|
|
131
|
-
Patch needed path in dylink section
|
|
132
|
-
"""
|
|
163
|
+
def patch_runtime_path(dylib: Path, runtime_path: Path):
|
|
133
164
|
with ModuleWritable(dylib) as m:
|
|
134
|
-
patched_module = m.
|
|
165
|
+
patched_module = m.patch_runtime_path(runtime_path)
|
|
135
166
|
|
|
136
167
|
return patched_module
|
|
137
168
|
|