Open joemarshall opened 9 months ago
Thanks for the report @joemarshall! Yes, there are a few places where micropip and pyodide.loadPackage behaves differently in terms of loading dynamic libraries, and I'm thinking of improving this by having micropip reuse the code from loadPackage.
By the way, the linked issue seems to be resolved, so if we upgrade the emscripten version in the future, will this issue itself be resolved?
Looks like this should be fixed with emscripten 3.1.46 (https://github.com/emscripten-core/emscripten/pull/20210) or once we update to it in pyodide (currently we are at 3.1.45). Thanks for reporting this to emscripten @joemarshall !
Maybe we should backport that commit?
I have multiple cython extensions, all of which use a common library module.
This installs fine with
pyodide.loadPackage
, but in micropip it doesn't work.There's an underlying bug in emscripten https://github.com/emscripten-core/emscripten/issues/20203 which is causing this, as if multiple libraries which are imported as local depend on the same common dependencies, the second and following imports don't bring any symbols into the local namespace. Until that fix is in, it would be nice for it to work in micropip the same way it does in
pyodide.loadPackage
, which is to detect dependency libraries and make them globally imported.