-
Notifications
You must be signed in to change notification settings - Fork 318
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
Python bindings broken when DESTDIR
is set
#545
Comments
Are you trying to package the bindings? Your cmake command should not enable them. -Travis |
I maintain the libiio package in archlinux. I explicitly want to enable the bindings, that is the whole point. It previously worked fine, but the newly introduced I already updated the package and just removed the check, but this should be properly fixed here. |
Shouldn't this be handled by the cmake?
|
|
Unrelated comment: It is usually hard to get every behavior right when using CMake. This is why I generally advocate using a build system like meson. FHS paths and standard env vars/options can be complex and have a lot of nuances, meson will handle this for you while CMake makes you do it yourself for the most part. |
Until a better one comes along. :) the "best" one that works, and is maintainable by the people on the team :)
So - don't do those. They seem pretty easy to avoid. In our opinion, the c library should be installed by the package manager - and the python bindings by the python package manager (pypi). Most other libraries did it this way when we looked at things... -Robin |
I'm seeing the same issue in Fedora. A lot of distro users like them to come from the same place. How do you keep the pypi bindings and C library in sync between the distro and pypi? How do distro users find the pypi bindings. In a lot of enterprise cases pypi is explicitly blocked so organisations can control/audit the use of source. There is a real use case to have bindings and library available from the same location. |
I understand. I usually think it's worth investing some initial extra time to minimize problems in the future.
But to avoid them you must know they exist and that you should avoid them :P In my experience dealing with build systems, environments, etc. the ones which give less problems are the ones that try to do the right thing for you, the ones that do not assume you have a vast knowledge and try to simplify things. This is my main pet peeve with CMake -- it's too easy to screw up.
While I see where you might come from, I don't think it's correct. While it might work fine for pure python and simple native packages, if you go a bit further it's a mess. Don't believe me? Have a look at anaconda and see for yourself. In this specific case, what if I have an application that depends on the bindings? If it's pure python, it shouldn't be much of an issue. But let's say it is a Python/native application, and as such can't be packaged by pip. How would you handle those cases? This is a valid and very possible use-case. On top of this, I can't see any drawbacks of packaging the python bindings in distribution repositories apart from you having to support this use-case. I think pip is very useful, but for development. You can setup virtual environments and use it for your development, but you shouldn't use it for system package management. End users should not use pip, they should use the distribution package manager. When you deal with native code you need to worry about binary compatibility, native dependencies, etc. pip is just not designed to do that. If something breaks when mixing pip and system packages/manual installations, you can fix it. The end user probably won't be able to, and that shouldn't be expected from him. |
That’s what we were trying to do - help support end users. (Not developers). We were getting lots of questions from people about installing things on pip, but not installing the actual c library. That’s why we put the check in there.... We can remove the check - but unfixed the problem we were trying to solve. |
You don't need to remove the check, Everything would be easier for you if you were able to say to your users to just install the system package. For Arch Linux you can 😄. |
Yeah, more and more distributions are including libiio in upstream packages (and we do point to those), see the new doc - it's just that everyone is doing it a little differently. :) Thanks for the feedback - we will have a look, and try to make sure this gets resolved. -Robin |
DESTDIR
is set
21023a5 broke destdir installations. It does not find the library because the it hasn't been installed to the filesystem.
This use-case is commonly required by packagers.
The text was updated successfully, but these errors were encountered: