Intermediate solution for handling the packaged DLL files#98
Intermediate solution for handling the packaged DLL files#98
Conversation
- DLL files are not renamed during installation - 32bit/64bit DLLs are explicitly selected when importing PySoundFile - DLLs from the official libsndfile installer are preferred, if available
|
If I understand this correctly, all this does is to shift the "renaming" from distribution time to run time. Why would we want to do this? As far as I know, the correct name for sndfile on Windows is |
|
Right, now that you mention it, I also see that this doesn't really solve anything. But the question of DLL names is still open ...
I don't know if there is such a thing as a correct name on Windows. Is there another source which uses the name
But currently this doesn't work! Shall we change this from I think it would be good to already support the DLL from the libsndfile installer, so we should probably try these three strings in The idea behind this order: First, try the Unix-like name (where How should the files in our repository be named? Since we want to remove the DLLs at some point anyway, we can also just drop this PR and fix the situation later, once a proper libsndfile installer is available. |
|
If I remember correctly, Looking through Windows' own libraries in C:\Windows\System32 (64 bit) and C:\Windows\SysWOW64 (32 bit), it generally uses no |
It didn't when I tried it. This does add the proper extension, but it doesn't add Citing from the documentation: "On Windows, [...], but since there is no predefined naming scheme a call like I tried it on a Windows 7 system and
I still wouldn't use the word correct, since apparently there is no naming scheme at all and the official installer uses something completely different. Given that, I think for now we should keep the code as is (using only Once an updated libsndfile installer is available (see libsndfile/libsndfile#89), we should check for I suggest to reject both #88 and this PR (#98), but to cherry-pick the unrelated commit 9bed1db into |
|
I agree. |
|
OK, I'm closing this. |
|
What do you have in mind to fix problem of moving the DLLs around in setup.py? |
|
There's no solution, really. The Windows bdist installer requires two different DLLs depending on the bit-depth of the installed Python. There is no way to prevent this. Ideally, I wouldn't want the DLL to be part of the installer at all. Hopefully, we can solve this with the help of the maintainer of sndfile. The only other way would be to somehow move the DLLs out of this repository and create the bdist installers outside of this repo. I'm open for suggestions. But moving the code from setup.py to pysoundfile.py is not a solution. |
|
What I mean: you're copying the files outside of The files will be copied whether I do If you need to copy the files you should at least do so in the corresponding command ( |
|
True. I hope I'll have time to look into that, soon. |
WARNING: I didn't test this under Windows!
With this PR I tried to find a middle ground between the current state and the suggestions from #47 and #88.
This still assumes that we keep the DLLs in the repository and provide binary Windows installers for the upcoming 0.6.0 release.
At a later point, once a proper installer for libsndfile is available (see libsndfile/libsndfile#89), we can completely remove the DLLs from the repository.
Differences to #88:
sdist,bdist*) if built on non-Windows.sndfile.dllis not supported anymoreWould this be a meaningful solution for the upcoming release?
Currently, I have no Windows system available, so I couldn't test if this actually works under Windows!