hidapi: make hid_parser optional, but add it to setup
This commit is contained in:
parent
20c4d64d17
commit
069f96fe48
|
@ -38,7 +38,6 @@ from time import time as _timestamp
|
|||
|
||||
import gi
|
||||
|
||||
from hid_parser import ReportDescriptor as _ReportDescriptor
|
||||
from pyudev import Context as _Context
|
||||
from pyudev import Device as _Device
|
||||
from pyudev import DeviceNotFoundError
|
||||
|
@ -115,6 +114,8 @@ def _match(action, device, filterfn):
|
|||
return # these are devices connected through a receiver so don't pick them up here
|
||||
|
||||
try: # if report descriptor does not indicate HID++ capabilities then this device is not of interest to Solaar
|
||||
from hid_parser import ReportDescriptor as _ReportDescriptor
|
||||
|
||||
hidpp_short = hidpp_long = False
|
||||
devfile = "/sys" + hid_device.get("DEVPATH") + "/report_descriptor"
|
||||
with fileopen(devfile, "rb") as fd:
|
||||
|
|
1
setup.py
1
setup.py
|
@ -76,6 +76,7 @@ For instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/in
|
|||
python_requires=">=3.7",
|
||||
install_requires=[
|
||||
'evdev (>= 1.1.2) ; platform_system=="Linux"',
|
||||
'hid_parser (>= 0.0.3) ; platform_system=="Linux"',
|
||||
"pyudev (>= 0.13)",
|
||||
"PyYAML (>= 3.12)",
|
||||
"python-xlib (>= 0.27)",
|
||||
|
|
Loading…
Reference in New Issue