Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion environment-dev_3.1.45.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- yarn
- click
- empack >=3.0.1
- microsoft::playwright
- microsoft::playwright <= 1.50
- ninja
- nodejs
- pyjs_code_runner >= 2.0.1
Expand Down
2 changes: 1 addition & 1 deletion environment-dev_3.1.58.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- yarn
- click
- empack >=3.0.1
- microsoft::playwright
- microsoft::playwright <= 1.50
- ninja
- nodejs
- pyjs_code_runner >= 2.0.1
Expand Down
24 changes: 15 additions & 9 deletions include/pyjs/pre_js/dynload/dynload.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,18 @@ async function loadDynlib(prefix, lib, global, searchDirs, readFileFunc) {
const fs = createDynlibFS(prefix, lib, searchDirs, readFileFunc);

const libName = Module.PATH.basename(lib);
//console.log(`load ${lib} (${libName}) `)

// contains cpython-3 and with wasm32-emscripten
const is_cython_lib = libName.includes("cpython-3") && libName.includes("wasm32-emscripten");

// load cython library from full path
const load_name = is_cython_lib ? lib : libName;

await Module.loadDynamicLibrary(libName, {
await Module.loadDynamicLibrary(load_name, {
loadAsync: true,
nodelete: true,
allowUndefined: true,
global: global,
global: global && !is_cython_lib,
fs: fs
})

Expand All @@ -219,13 +224,14 @@ async function loadDynlib(prefix, lib, global, searchDirs, readFileFunc) {
console.execption(`Failed to load ${libName} from ${lib} LDSO not found`);
}

if (!dsoOnlyLibName) {
if(!is_cython_lib){
if (!dsoOnlyLibName) {
Module.LDSO.loadedLibsByName[libName] = dsoFullLib
}

Module.LDSO.loadedLibsByName[libName] = dsoFullLib
}

if(!dsoFullLib){
Module.LDSO.loadedLibsByName[lib] = dsoOnlyLibName;
if(!dsoFullLib){
Module.LDSO.loadedLibsByName[lib] = dsoOnlyLibName;
}
}
} finally {
releaseDynlibLock();
Expand Down
Loading