auditwheel-emscripten 0.2.1__tar.gz → 0.2.2__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 (48) hide show
  1. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/.pre-commit-config.yaml +1 -1
  2. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/PKG-INFO +2 -3
  3. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/cli/main.py +83 -52
  4. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/pyproject.toml +1 -2
  5. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/.flake8 +0 -0
  6. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/.github/workflows/deploy.yml +0 -0
  7. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/.github/workflows/test.yml +0 -0
  8. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/.gitignore +0 -0
  9. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/CHANGELOG.md +0 -0
  10. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/LICENSE +0 -0
  11. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/README.md +0 -0
  12. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/__init__.py +0 -0
  13. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/cli/__init__.py +0 -0
  14. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/emscripten_tools/__init__.py +0 -0
  15. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/emscripten_tools/diagnostics.py +0 -0
  16. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/emscripten_tools/utils.py +0 -0
  17. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/emscripten_tools/webassembly.py +0 -0
  18. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/exports.py +0 -0
  19. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/function_type.py +0 -0
  20. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/imports.py +0 -0
  21. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/lib_utils.py +0 -0
  22. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/module.py +0 -0
  23. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/py.typed +0 -0
  24. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/repair.py +0 -0
  25. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/show.py +0 -0
  26. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/wasm_utils.py +0 -0
  27. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/auditwheel_emscripten/wheel_utils.py +0 -0
  28. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/paths.py +0 -0
  29. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/Shapely-1.8.2-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
  30. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/elf +0 -0
  31. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/galpy-1.8.0-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
  32. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libcrypto.so +0 -0
  33. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libgeos.so +0 -0
  34. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libgeos.so.3.10.3 +0 -0
  35. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libgeos_c.so +0 -0
  36. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libgeos_c.so.1 +0 -0
  37. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libgeos_c.so.1.16.1 +0 -0
  38. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libgeos_c.wasm +0 -0
  39. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/libssl.so +0 -0
  40. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_data/numpy-1.22.4-cp310-cp310-emscripten_3_1_14_wasm32.whl +0 -0
  41. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_exports.py +0 -0
  42. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_function_type.py +0 -0
  43. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_imports.py +0 -0
  44. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_repair.py +0 -0
  45. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_show.py +0 -0
  46. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_utils.py +0 -0
  47. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/test/test_wheel_utils.py +0 -0
  48. {auditwheel_emscripten-0.2.1 → auditwheel_emscripten-0.2.2}/uv.lock +0 -0
@@ -34,7 +34,7 @@ repos:
34
34
  - id: black
35
35
 
36
36
  - repo: https://github.com/pycqa/flake8
37
- rev: "7.1.2"
37
+ rev: "7.2.0"
38
38
  hooks:
39
39
  - id: flake8
40
40
  additional_dependencies: [flake8-bugbear]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auditwheel_emscripten
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: auditwheel-like tool for Pyodide
5
5
  Project-URL: Home, https://github.com/pyodide/auditwheel-emscripten
6
6
  Author-email: Gyeongjae Choi <def6488@gmail.com>
@@ -381,8 +381,7 @@ License-File: LICENSE
381
381
  Requires-Python: >=3.12
382
382
  Requires-Dist: leb128
383
383
  Requires-Dist: packaging
384
- Requires-Dist: pyodide-cli
385
- Requires-Dist: typer
384
+ Requires-Dist: pyodide-cli>=0.4
386
385
  Requires-Dist: wheel
387
386
  Provides-Extra: test
388
387
  Requires-Dist: pytest; extra == 'test'
@@ -1,16 +1,14 @@
1
1
  from pathlib import Path
2
2
 
3
- import typer
3
+ import click
4
4
 
5
5
  from .. import function_type, get_exports, get_imports, repair, show
6
6
  from ..show import locate_dependency
7
7
  from ..wheel_utils import unpack_if_wheel
8
8
 
9
- app = typer.Typer()
10
9
 
11
-
12
- @app.callback(no_args_is_help=True)
13
- def main():
10
+ @click.group(no_args_is_help=True)
11
+ def app():
14
12
  """Auditwheel-like tool for emscripten wheels and shared libraries."""
15
13
 
16
14
 
@@ -43,19 +41,18 @@ def print_dylib(
43
41
 
44
42
 
45
43
  @app.command("show")
44
+ @click.argument("wheel_or_so_file", type=click.Path(path_type=Path))
45
+ @click.option("--with-runtime-paths", "-r", is_flag=True, help="Show runtime paths.")
46
46
  def _show(
47
- wheel_or_so_file: Path = typer.Argument(
48
- ..., help="Path to wheel or a shared library file."
49
- ),
50
- show_runtime_paths: bool = typer.Option(
51
- False,
52
- "-r",
53
- "--with-runtime-paths",
54
- help="Show runtime paths.",
55
- ),
47
+ wheel_or_so_file: Path,
48
+ show_runtime_paths: bool,
56
49
  ):
57
50
  """
58
51
  Show shared library dependencies of a wheel or a shared library file.
52
+
53
+ \b
54
+ Arguments:
55
+ WHEEL_OR_SO_FILE: Path to wheel or a shared library file. (required)
59
56
  """
60
57
  try:
61
58
  libraries = show(wheel_or_so_file)
@@ -68,25 +65,33 @@ def _show(
68
65
 
69
66
 
70
67
  @app.command("repair")
68
+ @click.argument("wheel_file", type=click.Path(path_type=Path))
69
+ @click.option(
70
+ "--libdir",
71
+ type=click.Path(path_type=Path),
72
+ default="lib",
73
+ help="Path to the directory containing the shared libraries.",
74
+ show_default=True,
75
+ )
76
+ @click.option(
77
+ "--output-dir",
78
+ type=click.Path(path_type=Path),
79
+ default=None,
80
+ help="Directory to output repaired wheel or shared library. (default: overwrite the input file)",
81
+ )
82
+ @click.option("--with-runtime-paths", "-r", is_flag=True, help="Show runtime paths.")
71
83
  def _repair(
72
- wheel_file: Path = typer.Argument(..., help="Path to wheel file."),
73
- libdir: Path = typer.Option(
74
- "lib",
75
- help="Path to the directory containing the shared libraries.",
76
- ),
77
- output_dir: Path = typer.Option(
78
- None,
79
- help="Directory to output repaired wheel or shared library. (default: overwrite the input file)",
80
- ),
81
- show_runtime_paths: bool = typer.Option(
82
- False,
83
- "-r",
84
- "--with-runtime-paths",
85
- help="Show runtime paths.",
86
- ),
84
+ wheel_file: Path,
85
+ libdir: Path,
86
+ output_dir: Path | None,
87
+ show_runtime_paths: bool,
87
88
  ):
88
89
  """
89
90
  Repair a wheel file: copy shared libraries to the wheel directory.
91
+
92
+ \b
93
+ Arguments:
94
+ WHEEL_FILE: Path to wheel file. (required)
90
95
  """
91
96
  try:
92
97
  repaired_wheel = repair(
@@ -105,35 +110,54 @@ def _repair(
105
110
 
106
111
 
107
112
  @app.command("copy")
113
+ @click.argument("wheel_file", type=click.Path(path_type=Path))
114
+ @click.option(
115
+ "--libdir",
116
+ type=click.Path(path_type=Path),
117
+ default="lib",
118
+ help="Path to the directory containing the shared libraries.",
119
+ show_default=True,
120
+ )
121
+ @click.option(
122
+ "--output-dir",
123
+ type=click.Path(path_type=Path),
124
+ default=None,
125
+ help="Directory to output repaired wheel or shared library. (default: overwrite the input file)",
126
+ )
108
127
  def _copy(
109
- wheel_file: Path = typer.Argument(..., help="Path to wheel file."),
110
- libdir: Path = typer.Option(
111
- "lib",
112
- help="Path to the directory containing the shared libraries.",
113
- ),
114
- output_dir: Path = typer.Option(
115
- None,
116
- help="Directory to output repaired wheel or shared library. (default: overwrite the input file)",
117
- ),
128
+ wheel_file: Path,
129
+ libdir: Path,
130
+ output_dir: Path | None,
118
131
  ):
119
132
  """
120
133
  [Deprecated] Copy shared libraries to the wheel directory. Works same as `repair`. Use `repair` instead.
134
+
135
+ \b
136
+ Arguments:
137
+ WHEEL_FILE: Path to wheel file. (required)
121
138
  """
122
139
  return _repair(wheel_file, libdir, output_dir)
123
140
 
124
141
 
125
142
  @app.command("exports")
143
+ @click.argument("wheel_or_so_file", type=click.Path(path_type=Path))
144
+ @click.option(
145
+ "--show-type",
146
+ is_flag=True,
147
+ help="Show function type.",
148
+ default=False,
149
+ show_default=True,
150
+ )
126
151
  def _exports(
127
- wheel_or_so_file: Path = typer.Argument(
128
- ..., help="Path to wheel or a shared library file."
129
- ),
130
- show_type: bool = typer.Option(
131
- False,
132
- help="Show function type.",
133
- ),
152
+ wheel_or_so_file: Path,
153
+ show_type: bool,
134
154
  ):
135
155
  """
136
156
  Show exports of a wheel or a shared library file.
157
+
158
+ \b
159
+ Arguments:
160
+ WHEEL_OR_SO_FILE: Path to wheel or a shared library file. (required)
137
161
  """
138
162
  try:
139
163
  exports = get_exports(wheel_or_so_file)
@@ -154,17 +178,24 @@ def _exports(
154
178
 
155
179
 
156
180
  @app.command("imports")
181
+ @click.argument("wheel_or_so_file", type=click.Path(path_type=Path))
182
+ @click.option(
183
+ "--show-type",
184
+ is_flag=True,
185
+ help="Show function type.",
186
+ default=False,
187
+ show_default=True,
188
+ )
157
189
  def _imports(
158
- wheel_or_so_file: Path = typer.Argument(
159
- ..., help="Path to wheel or a shared library file."
160
- ),
161
- show_type: bool = typer.Option(
162
- False,
163
- help="Show function type.",
164
- ),
190
+ wheel_or_so_file: Path,
191
+ show_type: bool,
165
192
  ):
166
193
  """
167
194
  Show imports of a wheel or a shared library file.
195
+
196
+ \b
197
+ Arguments:
198
+ WHEEL_OR_SO_FILE: Path to wheel or a shared library file. (required)
168
199
  """
169
200
  try:
170
201
  imports = get_imports(wheel_or_so_file)
@@ -12,8 +12,7 @@ requires-python = ">=3.12"
12
12
  dependencies = [
13
13
  "leb128",
14
14
  "packaging",
15
- "pyodide-cli",
16
- "typer",
15
+ "pyodide-cli>=0.4",
17
16
  "wheel",
18
17
  ]
19
18
  license.file = "LICENSE"