-
Notifications
You must be signed in to change notification settings - Fork 306
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
dpkg-query not found on all Linux systems #51
Comments
Ah, of course. This was an oversight on my part; thank you for bringing it to my attention! How would you propose to do this on Arch Linux? To use a call to |
Made new release (0.2.3) to PyPI that I think will fix the issue, given that you actually have BlueZ installed on your Arch Linux. |
Cool, thanks! -- i'd already cheated a bit by commenting out the check. Otherwise it does exactly what i needed, with way less code that the other library i tried. I had a look around to for a way to check the version in Python, but didn't find anything. With ctype.util.find_library("bluetooth") you can find the bluetooth library version, but i'm not sure that's what you want. If you're using bluez via dbus, i'd hope there is a way of querying the availability and version of services, but don't know enough about dbus to make progress in the time i have. Using bluetoothctl is probably a reasonable solution. I'd add some kind of catch for when it's not available. Perhaps falling back on dpkg-query. If neither of those work, perhaps just a warning will do? |
Looking at the names of the Bluez things you use, it looks like Bluez versions its interfaces. Perhaps you don't need to test for a specific Bluez version, and can just try opening the interfaces and taking a failure to mean it's not installed. If the interfaces open, then they should have a compatible interface. |
I will use |
Description
The
__init__
function fails with "no such file or directory 'dpkg-query'" when using the module. Dpkg is not used on Arch Linux, so i would not expect this check to pass.What I Did
Started the Python interpreter and attempted
import bleak
Many thanks for the nice looking library!
The text was updated successfully, but these errors were encountered: