Package Details: python-bluetooth-battery 1.3.2-4

Git Clone URL: https://aur.archlinux.org/python-bluetooth-battery.git (read-only, click to copy)
Package Base: python-bluetooth-battery
Description: A python script to get battery level from Bluetooth headsets
Upstream URL: https://pypi.org/project/bluetooth-battery
Licenses: GPL-3.0
Submitter: galaxy102
Maintainer: galaxy102
Last Packager: galaxy102
Votes: 2
Popularity: 0.005691
First Submitted: 2021-11-13 22:59 (UTC)
Last Updated: 2022-09-10 21:24 (UTC)

Dependencies (3)

Sources (0)

Pinned Comments

galaxy102 commented on 2023-10-07 19:57 (UTC) (edited on 2023-10-07 19:57 (UTC) by galaxy102)

Sorry for not responding in a timely manner, I was on vacation.

You need to rebuild (clean build) this package when updating your Python minor version due to the way it is packaged. This problem is sadly common for most/all? AUR Python packages.

Detail: This is due to the paths Python searches for packages.

Python 3.11.5 (main, Sep  2 2023, 14:16:33) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/lib/python3.11/site-packages']

As you can see, the version is included in all paths.

I hope that this fixes your issue. I had the same issue upon reproducing it and was able to fix it by clean building and reinstalling the package.

Latest Comments

galaxy102 commented on 2023-10-07 19:57 (UTC) (edited on 2023-10-07 19:57 (UTC) by galaxy102)

Sorry for not responding in a timely manner, I was on vacation.

You need to rebuild (clean build) this package when updating your Python minor version due to the way it is packaged. This problem is sadly common for most/all? AUR Python packages.

Detail: This is due to the paths Python searches for packages.

Python 3.11.5 (main, Sep  2 2023, 14:16:33) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/lib/python3.11/site-packages']

As you can see, the version is included in all paths.

I hope that this fixes your issue. I had the same issue upon reproducing it and was able to fix it by clean building and reinstalling the package.

AkechiShiro commented on 2023-09-30 23:58 (UTC)

This pkg seems broken, running it leads to this :

Traceback (most recent call last):
  File "/usr/bin/bluetooth_battery", line 5, in <module>
    from bluetooth_battery.bluetooth_battery import main
ModuleNotFoundError: No module named 'bluetooth_battery'

galaxy102 commented on 2022-09-10 21:25 (UTC)

Done

eclairevoyant commented on 2022-09-09 04:54 (UTC) (edited on 2022-09-09 05:05 (UTC) by eclairevoyant)

Please update the package to install to a valid location; as per the packaging guidelines:

Packages should never be installed to /usr/local/

This section of the page provides examples of where we should usually install to: https://wiki.archlinux.org/title/Arch_package_guidelines#Directories