auditwheel-emscripten 0.0.13__tar.gz → 0.0.14__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.
Files changed (46) hide show
  1. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/.pre-commit-config.yaml +8 -8
  2. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/CHANGELOG.md +14 -0
  3. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/PKG-INFO +5 -9
  4. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/README.md +4 -8
  5. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/cli/main.py +7 -11
  6. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/repair.py +2 -5
  7. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_repair.py +1 -1
  8. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/.flake8 +0 -0
  9. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/.github/workflows/deploy.yml +0 -0
  10. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/.github/workflows/test.yml +0 -0
  11. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/.gitignore +0 -0
  12. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/LICENSE +0 -0
  13. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/__init__.py +0 -0
  14. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/cli/__init__.py +0 -0
  15. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/emscripten_tools/__init__.py +0 -0
  16. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/emscripten_tools/diagnostics.py +0 -0
  17. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/emscripten_tools/utils.py +0 -0
  18. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/emscripten_tools/webassembly.py +0 -0
  19. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/exports.py +0 -0
  20. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/function_type.py +0 -0
  21. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/imports.py +0 -0
  22. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/lib_utils.py +0 -0
  23. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/module.py +0 -0
  24. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/py.typed +0 -0
  25. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/show.py +0 -0
  26. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/wasm_utils.py +0 -0
  27. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/auditwheel_emscripten/wheel_utils.py +0 -0
  28. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/pyproject.toml +0 -0
  29. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/paths.py +0 -0
  30. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
  31. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/elf +0 -0
  32. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/galpy-1.8.0-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
  33. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libcrypto.so +0 -0
  34. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libgeos.so +0 -0
  35. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libgeos.so.3.10.3 +0 -0
  36. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libgeos_c.so +0 -0
  37. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libgeos_c.so.1 +0 -0
  38. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libgeos_c.so.1.16.1 +0 -0
  39. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libgeos_c.wasm +0 -0
  40. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/libssl.so +0 -0
  41. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_data/numpy-1.22.4-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
  42. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_exports.py +0 -0
  43. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_function_type.py +0 -0
  44. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_imports.py +0 -0
  45. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_show.py +0 -0
  46. {auditwheel_emscripten-0.0.13 → auditwheel_emscripten-0.0.14}/test/test_utils.py +0 -0
@@ -3,7 +3,7 @@ default_language_version:
3
3
  python: "3.11"
4
4
  repos:
5
5
  - repo: https://github.com/pre-commit/pre-commit-hooks
6
- rev: "v4.4.0"
6
+ rev: "v4.5.0"
7
7
  hooks:
8
8
  - id: check-case-conflict
9
9
  - id: check-merge-conflict
@@ -16,42 +16,42 @@ repos:
16
16
  - id: trailing-whitespace
17
17
 
18
18
  - repo: https://github.com/asottile/pyupgrade
19
- rev: "v3.4.0"
19
+ rev: "v3.15.0"
20
20
  hooks:
21
21
  - id: pyupgrade
22
22
  args: ["--py310-plus"]
23
23
 
24
24
  - repo: https://github.com/hadialqattan/pycln
25
- rev: "v2.1.5"
25
+ rev: "v2.4.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: "23.3.0"
32
+ rev: "23.12.0"
33
33
  hooks:
34
34
  - id: black
35
35
 
36
36
  - repo: https://github.com/pycqa/flake8
37
- rev: "6.0.0"
37
+ rev: "6.1.0"
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.3.0"
43
+ rev: "v1.7.1"
44
44
  hooks:
45
45
  - id: mypy
46
46
  exclude: auditwheel_emscripten/emscripten_tools
47
47
 
48
48
  - repo: https://github.com/shellcheck-py/shellcheck-py
49
- rev: "v0.9.0.5"
49
+ rev: "v0.9.0.6"
50
50
  hooks:
51
51
  - id: shellcheck
52
52
 
53
53
  - repo: https://github.com/codespell-project/codespell
54
- rev: "v2.2.4"
54
+ rev: "v2.2.6"
55
55
  hooks:
56
56
  - id: codespell
57
57
  args: ["-L", "te,slowy,aray,ba,nd,classs,crate,feld,lits"]
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## [0.0.14] - 2023-12-23
11
+
12
+ ### Changed
13
+
14
+ - Changed the behavior of the `repair` command. It does not update `needed` section anymore
15
+ and only copies the shared libraries to the wheel.
16
+ Also, `copy` command is deprecated in favor of `repair`.
17
+ ([#25](https://github.com/ryanking13/auditwheel-emscripten/pull/25))
18
+
19
+ ## [0.0.13] - 2023.06.08
20
+
21
+ - Added py.typed file.
22
+ ([#16](https://github.com/ryanking13/auditwheel-emscripten/pull/16))
23
+
10
24
  ## [0.0.12] - 2023.02.13
11
25
 
12
26
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auditwheel_emscripten
3
- Version: 0.0.13
3
+ Version: 0.0.14
4
4
  Summary: auditwheel-like tool for Pyodide
5
5
  Project-URL: Home, https://github.com/ryanking13/auditwheel-emscripten
6
6
  Author-email: Gyeongjae Choi <def6488@gmail.com>
@@ -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 copy`: copies these external shared libraries into the wheel itself.
410
+ - `pyodide auditwheel repair`: copies these external shared libraries into the wheel itself.
411
411
 
412
412
  ## Usage (CLI)
413
413
 
@@ -420,10 +420,10 @@ Python-in-the-browser using Emscripten.
420
420
  │ --help Show this message and exit. │
421
421
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
422
422
  ╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
423
- │ copy Copy shared libraries to the wheel directory. Similar to repair but does not modify the needed section of WASM module.
423
+ │ copy [Deprecated] Copy shared libraries to the wheel directory. Works same as repair. Use repair instead.
424
424
  │ exports Show exports of a wheel or a shared library file. │
425
425
  │ imports Show imports of a wheel or a shared library file. │
426
- │ repair [Experimental] Repair a wheel file: copy shared libraries to the wheel directory and modify the path in the wheel file. │
426
+ │ repair Repair a wheel file: copy shared libraries to the wheel directory. │
427
427
  │ show Show shared library dependencies of a wheel or a shared library file. │
428
428
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
429
429
  ```
@@ -440,7 +440,7 @@ The following external shared libraries are required:
440
440
  ```
441
441
 
442
442
  ```sh
443
- $ pyodide auditwheel copy --libdir <directory which contains libgeos_c.so> Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl
443
+ $ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so> Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl
444
444
 
445
445
  Repaired wheel has following external shared libraries:
446
446
  {
@@ -471,10 +471,6 @@ repaired_wheel = repair(
471
471
  "Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl",
472
472
  libdir="/path/where/shared/libraries/are/located",
473
473
  outdir="/path/to/output/directory",
474
- # If set this to true, modify the needed section of WASM module.
475
- # Note that is not compatible with WebAssembly dynamic linking ABI.
476
- # https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md
477
- modify_needed_section=False,
478
474
  )
479
475
  libs = show(repaired_wheel)
480
476
  print(libs)
@@ -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 copy`: copies these external shared libraries into the wheel itself.
20
+ - `pyodide auditwheel repair`: copies these external shared libraries into the wheel itself.
21
21
 
22
22
  ## Usage (CLI)
23
23
 
@@ -30,10 +30,10 @@ Python-in-the-browser using Emscripten.
30
30
  │ --help Show this message and exit. │
31
31
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
32
32
  ╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
33
- │ copy Copy shared libraries to the wheel directory. Similar to repair but does not modify the needed section of WASM module.
33
+ │ copy [Deprecated] Copy shared libraries to the wheel directory. Works same as repair. Use repair instead.
34
34
  │ exports Show exports of a wheel or a shared library file. │
35
35
  │ imports Show imports of a wheel or a shared library file. │
36
- │ repair [Experimental] Repair a wheel file: copy shared libraries to the wheel directory and modify the path in the wheel file. │
36
+ │ repair Repair a wheel file: copy shared libraries to the wheel directory. │
37
37
  │ show Show shared library dependencies of a wheel or a shared library file. │
38
38
  ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
39
39
  ```
@@ -50,7 +50,7 @@ The following external shared libraries are required:
50
50
  ```
51
51
 
52
52
  ```sh
53
- $ pyodide auditwheel copy --libdir <directory which contains libgeos_c.so> Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl
53
+ $ pyodide auditwheel repair --libdir <directory which contains libgeos_c.so> Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl
54
54
 
55
55
  Repaired wheel has following external shared libraries:
56
56
  {
@@ -81,10 +81,6 @@ repaired_wheel = repair(
81
81
  "Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl",
82
82
  libdir="/path/where/shared/libraries/are/located",
83
83
  outdir="/path/to/output/directory",
84
- # If set this to true, modify the needed section of WASM module.
85
- # Note that is not compatible with WebAssembly dynamic linking ABI.
86
- # https://github.com/WebAssembly/tool-conventions/blob/main/DynamicLinking.md
87
- modify_needed_section=False,
88
84
  )
89
85
  libs = show(repaired_wheel)
90
86
  print(libs)
@@ -43,11 +43,14 @@ def _repair(
43
43
  ),
44
44
  ):
45
45
  """
46
- [Experimental] Repair a wheel file: copy shared libraries to the wheel directory and modify the path in the wheel file.
46
+ Repair a wheel file: copy shared libraries to the wheel directory.
47
47
  """
48
48
  try:
49
49
  repaired_wheel = repair(
50
- wheel_file, libdir, output_dir, modify_needed_section=True
50
+ wheel_file,
51
+ libdir,
52
+ output_dir,
53
+ modify_needed_section=False,
51
54
  )
52
55
  dependencies = show(repaired_wheel)
53
56
  pprint(dependencies)
@@ -68,16 +71,9 @@ def _copy(
68
71
  ),
69
72
  ):
70
73
  """
71
- Copy shared libraries to the wheel directory. Similar to repair but does not modify the needed section of WASM module.
74
+ [Deprecated] Copy shared libraries to the wheel directory. Works same as `repair`. Use `repair` instead.
72
75
  """
73
- try:
74
- repaired_wheel = repair(
75
- wheel_file, libdir, output_dir, modify_needed_section=False
76
- )
77
- dependencies = show(repaired_wheel)
78
- pprint(dependencies)
79
- except RuntimeError as e:
80
- raise e
76
+ return _repair(wheel_file, libdir, output_dir)
81
77
 
82
78
 
83
79
  @app.command("exports")
@@ -80,7 +80,7 @@ def repair(
80
80
  libdir: str | Path,
81
81
  outdir: str | Path | None,
82
82
  lib_sdir: str = ".libs",
83
- modify_needed_section: bool = False,
83
+ modify_needed_section: bool = False, # Deprecated
84
84
  ) -> Path:
85
85
  file = Path(wheel_file)
86
86
  if not file.exists():
@@ -100,10 +100,7 @@ def repair(
100
100
  tmpdir = Path(tmpdirname)
101
101
 
102
102
  extract_dir = unpack(str(wheel_file), str(tmpdir))
103
- if modify_needed_section:
104
- repair_extracted(extract_dir, dep_map, lib_sdir)
105
- else:
106
- copylib(extract_dir, dep_map, lib_sdir)
103
+ copylib(extract_dir, dep_map, lib_sdir)
107
104
  pack(str(extract_dir), str(outdir), None)
108
105
 
109
106
  return outdir / file.name
@@ -60,7 +60,7 @@ def test_copylib(tmp_path, wheel_file, expected):
60
60
  SHAPELY_WHEEL,
61
61
  [
62
62
  "libgeos.so.3.10.3",
63
- "../../Shapely.libs/libgeos_c.so",
63
+ "libgeos_c.so",
64
64
  ],
65
65
  ),
66
66
  ],