auditwheel-emscripten 0.0.13__py3-none-any.whl → 0.0.15__py3-none-any.whl

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.
@@ -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
@@ -36,7 +36,7 @@ def is_emscripten_wheel(filename: str) -> bool:
36
36
  _, _, _, tags = parse_wheel_filename(filename)
37
37
  tag = list(tags)[0]
38
38
  platform = tag.platform
39
- return platform.startswith("emscripten")
39
+ return platform.startswith(("emscripten", "pyodide"))
40
40
 
41
41
 
42
42
  def parse_wheel_extract_dir(wheel_file: str | Path) -> str:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: auditwheel_emscripten
3
- Version: 0.0.13
3
+ Version: 0.0.15
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)
@@ -5,18 +5,18 @@ auditwheel_emscripten/imports.py,sha256=YI8KItf1qujmycSLb7c7igpCBXNqJAJVUIH3H8HY
5
5
  auditwheel_emscripten/lib_utils.py,sha256=4qodvz1go0tgHZA803Q3vcIR-QQbOdqSR0p2wo7wjrA,682
6
6
  auditwheel_emscripten/module.py,sha256=9bZ6eEMB5k7QUyOHWb4ni5m_ROPPieGKulseweCbGOk,5353
7
7
  auditwheel_emscripten/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- auditwheel_emscripten/repair.py,sha256=LmDqKeGgwPCLCTnsPAZpo0JrCgbOIYTqDYIm4zu_WY4,3486
8
+ auditwheel_emscripten/repair.py,sha256=rvmsx8pJkRX3yFiePOxUpfGIQ7Y18hLzQ41mXDeHD1w,3387
9
9
  auditwheel_emscripten/show.py,sha256=x7juLK0AxHZkEpbXIHGK91mC6Z_OFVLcuphBHoW-LHQ,1708
10
10
  auditwheel_emscripten/wasm_utils.py,sha256=-IuAWiPPOkWmPpaW4u3tyxttpP0ZTWeKk0VMh1dj384,220
11
- auditwheel_emscripten/wheel_utils.py,sha256=yWUGzPnNCbK54QDDLowPpDMwjoRWr5U-mXG8KpaAjzI,2621
11
+ auditwheel_emscripten/wheel_utils.py,sha256=pp40x9umTCsSyQHygKvkRMlRm9Sx_1S6zzwvriFXwPI,2634
12
12
  auditwheel_emscripten/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- auditwheel_emscripten/cli/main.py,sha256=v3Vq38YWeWT6X_sR7JZAJd5l7GDOxuWUeJgVGHIT8PU,4274
13
+ auditwheel_emscripten/cli/main.py,sha256=IsPyZbiEPNXc3pirHtSL2jA4uip8EzYdcRZznfnnx-E,4053
14
14
  auditwheel_emscripten/emscripten_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  auditwheel_emscripten/emscripten_tools/diagnostics.py,sha256=fG8kS7BByJKwC3JJrfJc0TB1EDV4W--LQwcf4fnN0GI,7072
16
16
  auditwheel_emscripten/emscripten_tools/utils.py,sha256=sAcW8WaxfN0lNA64y9d0_CsdfYecV_YUcN6nrDrMmMs,3316
17
17
  auditwheel_emscripten/emscripten_tools/webassembly.py,sha256=qFsTPSCrtVdiCISMF-CPyrGGxxKqN4QW4Bn2UsMEaGc,17027
18
- auditwheel_emscripten-0.0.13.dist-info/METADATA,sha256=Yt0uU_ZyaYTzxI8a_uwPoC4o6tAQTZc80u2jmoaGfjA,27359
19
- auditwheel_emscripten-0.0.13.dist-info/WHEEL,sha256=KGYbc1zXlYddvwxnNty23BeaKzh7YuoSIvIMO4jEhvw,87
20
- auditwheel_emscripten-0.0.13.dist-info/entry_points.txt,sha256=Jok5wALksOWKJv8BRV2Riozxts_stW2n-ud9uHTNCB8,62
21
- auditwheel_emscripten-0.0.13.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
22
- auditwheel_emscripten-0.0.13.dist-info/RECORD,,
18
+ auditwheel_emscripten-0.0.15.dist-info/METADATA,sha256=WXtqY4xWEY0M0kwVCf0A31w3CqDgO3hisdC0tgXg-ww,27042
19
+ auditwheel_emscripten-0.0.15.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
20
+ auditwheel_emscripten-0.0.15.dist-info/entry_points.txt,sha256=Jok5wALksOWKJv8BRV2Riozxts_stW2n-ud9uHTNCB8,62
21
+ auditwheel_emscripten-0.0.15.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
22
+ auditwheel_emscripten-0.0.15.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.17.1
2
+ Generator: hatchling 1.24.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any