I encountered a problem with the Windows packaging of gPodder
basic libraries (zlib, openssl) depended upon by python
platform-specific modules are loaded preferably :
1. from lib-dynload (where they are not)
2. from the Windows directory (can be any version)
3. from the binary directory, next to gpodder.exe (where they are)
So an old zlib1.dll installed by another application in c:\Windows was
loaded, incompatible with libpng and gPodder couldn't start.
I don't know what's the best approach to solve it:
- copy those libraries to lib\pythonxx\lib-dynload (works)
- preload them in my main script before they are loaded by the module
- patch something in python (dynload_win.c ?) to search first in the
executable directory (not tried)
The way we avoid these kinds of issues on Linux is to rename included libraries to unique names (e.g. zlib1-aef3742bc3e.dll), and patch the extension modules to look for the new names. There's a script (auditwheel) that does the heavy lifting. On MacOS there's a similar script people use, called "delocate".
Alternatively if you just want a hack that works quick, I'd do the preload thing. In general you need to do this anyway, if you don't have all your extension modules in the same directory. (Unfortunately Windows doesn't have the equivalent of RPATH.)