Skip to content

python: add SMTK's DLL directory to the Python DLL search path

Ben Boeckel requested to merge ben.boeckel/smtk:python38-dll-paths into master

With Python 3.8, CPython on Windows started restricting DLL searches to specified directories rather than relying on the PATH environment variable. This commit adds SMTK's DLL directory to the search path, but does not add the PATH entries required for dependent libraries. This works when all of the dependencies share a prefix (as in packages or a unified install tree), but does not work in a build tree. Considerations for how to add the required directories for a build tree need to be done.

CPython change in question:

https://github.com/python/cpython/commit/2438cdf0e932a341c7613bf4323d06b91ae9f1f1


This should get packages working. Build trees are still broken, but we'll need to think about how we can gather all of the required paths for that case reliably. It's not too hard for the superbuild case, but maybe that's the only development environment we care about?

I also have no idea how to fix it for prefix-per-project cases like Spack, Homebrew, Ports, Anaconda, or vcpkg (where Windows is supported). I assume they have solutions for these things in other ways since it's an endemic problem without a unified install tree.

Cc: @john.tourtellott @aron.helser @bob.obara

Merge request reports