Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major cleanup (new library loader, rm multilib, rm stdcall)
This removes support for multiple different libraries in one file, which IOHO was an inherent design mistake messing up the code - pypdfium2 ctypesgen is now single-lib. We also replace the old, bloated library loader with a new lean one. In the future, we may want an option to plug in a custom library loader so we can import config from pypdfium2. This also removes support for the windows-only stdcall convention because it's not needed for pypdfium2 and probably an edge case. It would cause some additional complexity and we're not sure what would be the cleanest way to integrate it, so this can wait. Fun fact: It seems like ctypesgen prior to this change added the complie_libdirs to the runtime library loader. Further, relative paths (I think) were never correctly interpreted relative to the file's directory, but to the user's CWD, which is useless and could even cause unexpected behavior. So runtime_libdirs = ["."] didn't work, but the fallback below "then we search the directory where the generated python interface is stored" captured.
- Loading branch information