Python 3.8 DLL load path is... troubled.
As of at least Python 3.8, the DLL search no longer consults the PATH. Trying to hl.load_plugin("gradient_autoscheduler") fails because LoadLibraryW only searches in the Python root dir and system32. It doesn't even check the current directory (for any reasonable definition of current).
Not sure what the appropriate fix is here. Maybe we can use LoadLibraryExW with appropriate flags to get the search to include the PATH.
On Python 3.8 there's a new add_dll_directory() API that might be able to help us work around this.
See: https://docs.python.org/3/whatsnew/3.8.html#ctypes See: https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew See: https://docs.python.org/3/library/os.html#os.add_dll_directory See: https://bugs.python.org/issue36085 See: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order
Is this windows-only?
Is this windows-only?
I believe so, yes. RPATH saves us on other systems.