-
Notifications
You must be signed in to change notification settings - Fork 120
Ship all dlls #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ship all dlls #113
Conversation
|
Very interesting. I am slowly coming around to the idea. Are there any other pip packages out there that ship compiled code? This still seems troublesome to me. If we do go down this route, we should ship OSX binaries as well. Linux users would probably prefer to use their package manager instead. |
Not that I am aware of. But simply shipping it as if it was some random binary file (which plenty of pip packages are doing) seems like a neatly simple solution to me: Other OSes just don't care and it potentially makes the installation on Windows less cumbersome. All that without requiring any special building and distributing on your side.
Thankfully there is Homebrew so there is no need for this. Both OSX and Linux are capable of installing the lib themselves (and it is second nature to devs on them to do so). |
As much as I would like to agree with you there, few Mac users actually know how to use homebrew. I think that including a Mac binary would help a lot of people. |
|
Oh boy, I hope that isn't true :-) I don't think it is your responsibility though to cater to some people, just because they're lazy. I would mention Homebrew in the readme and be done with it, honestly. |
|
I think there are at least two - rather disjoint - groups of potential users:
Note that I didn't call the second group "programmers", that's because I think most of them aren't. We should make the installation process as easy as possible for the second group, the first group will manage anyway. Having said that, I don't think it's a good idea to add a few megabytes of binary garbage to a source package that has a size of 32k. That's what binary packages are for! It's probably more important to get PySoundFile into Python distributions like Anaconda (if it's possible to include libsndfile in the package) and into more generic distributions like homebrew/MacPorts/Debian/...., which already contain a package for libsndfile. On the long run, we should delete the DLLs from our repository (and not add dylibs or anything) and, when installed with In the end, there should be two ways of installing PySoundFile:
I don't know if binary packages (wheels or something) are necessary at all, but I also don't have any experience with them. |
|
I absolutely agree, the binaries shouldn't be here at all.
This PR only tries to fix the current situation: PySoundFile cannot be installed on Windows using pip. |
|
OK, I didn't know that this PR is supposed to be a temporary solution! I thought the current temporary solution was to provide Windows installers for PySoundFile (see https://github.com/bastibe/PySoundFile/releases). What's wrong with that? This doesn't pollute the source package, and once the new libsndfile installer is available, we won't have to provide our installers anymore. |
|
You cannot install them using pip (and thus, no |
|
I see. I don't really see a solution for that except raising a The Windows-specific problem here is that the copying in |
|
Yes. But I wonder why the copy statements exist in there if they are expected to always fail? Do you need them to create the .exe installers (how are they created btw, |
|
Yes, as far as I know, that's the only reason (except of course it also works if you install directly from the Git checkout). Anyway, this is "dead code walking", since it will be completely removed once the new libsndfile installer comes out. |
|
I am indeed using The thing is: Since the binary installers are required on Windows anyway, as there is no practical way of installing sndfile otherwise, it never occurred to me that |
|
We decided to publish the next version as pip wheel and deprecate the binary Windows installers. This will hopefully solve this issue, and #110 as well. |
|
I see! Well, in that light this PR makes little sense. Wheels definitely sound good. You need to find a way that keeps the "we're only doing this for Windows" stuff out of the sdist though :-/ |
Sorry for flooding you guys with PRs again :-)
The situation is currently as follows:
setup.pycontains unsafe and untested executable code (can and does error on some OSes)pip install)This PR combines ideas and changes from #88, #98 and #110:
setup.pyThis dramatically reduces the surface of scenarios on which errors may appear:
setup.pyremains simple and declarative, working exactly the same on all OSespip installworks exactly the same on all OSesAnd thusly fixes the following errors:
pip install pysoundfiledoes not work on Windows,pip install -e .doespython setup.py helpmoves files about, even when not intended to