Skip to content

Commit 1ba97f7

Browse files
authored
accept anything with *.so.* as shared
1 parent ec0ac59 commit 1ba97f7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/pyjs/pre_js/load_pkg.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,20 @@ def _py_untar(tarball_path, target_dir):
4444
files = tar.getmembers()
4545
shared_libs = []
4646
for file in files:
47-
if file.name.endswith(".so"):
48-
47+
if file.name.endswith(".so") or ".so." in file.name:
4948
if target_dir == "/":
5049
shared_libs.append(f"/{file.name}")
5150
else:
5251
shared_libs.append(f"{target_dir}/{file.name}")
5352
5453
tar.extractall(target_dir)
54+
actual_shared_libs = []
5555
for file in shared_libs:
5656
if not check_wasm_magic_number(Path(file)):
5757
print(f" {file} is not a wasm file")
58-
s = json.dumps(shared_libs)
58+
else:
59+
actual_shared_libs.append(file)
60+
s = json.dumps(actual_shared_libs)
5961
except Exception as e:
6062
print("ERROR",e)
6163
raise e

0 commit comments

Comments
 (0)