I distribute a Python library that has wheels for OSX, Linux, and Windows. On Windows I have always included the DLLs using the data_files parameter to setup(). I copied this from an older package that I took over maintenance of, and it has always worked when I've tested it on Windows, but sometimes it doesn't work. I have no idea what the exact situation is that causes it not to work.
I recently asked the pip devs about why this was happening, and they said that the way I was specifying the file path was wrong, but they didn't know what the right way was. What is the right way to specify where DLLs should be installed in setup.py?
To be clear I am passing this value to data_files:
[("lib\\site-packages\\fugashi\\", [ ... build machine dll path ... ])]
This is kind of the same question as this one and this one, but the answer in both of those is to use data_files.