Closed minrk closed 3 years ago
At the moment, ctypes.util.find_library()
is used to search for dependent shared libraries. As far as I can tell, this just looks through the PATH
environment variable. I agree that it makes sense to add the compiler's runtime-redist directory as well to the search path by default.
We also don't check whether a needed DLL is already in the wheel. I agree that to work with other bundling tools or techniques that already place some DLLs into the wheel, we should better handle this situation.
Makes sense, thanks! I also think copying the vcruntime files from the Python root directory isn't the right thing to do, as they don't need to be shipped as a duplicate if they come with Python itself. That indicates the following changes should be made, if I understand correctly:
*\.pyd
should be added to ignore_regex?
I'm so pleased to see a Windows wheel repair tool!
I'm trying this out because I've just made a pyzmq release with missing DLL dependencies and I'd like to use your tool to help not make that mistake in the future. However, my existing bundling is resulting in some unexpected behavior. Running on pyzmq 21 wheel for Python 3.8, I get:
The problem is that msvcp140.dll and libzmq.cp38-win_amd64.pyd are already present in the top-level of the wheel due to my own incomplete steps to bundle dependencies, so should be found and not added for bundling. I would also expect msvcp140.dll to be found, since it's in the compiler's runtime-redist directory. Is this not searched by default?
It can be found with:
where all the vc++ redist dlls such as msvcp140.dll, vcruntime, etc. are in
redist_dir
. It seems like it would make sense to add this to the default search path if it exists.