From 4432b0879022a611a0e23374a287191001ba4a7c Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sat, 27 Apr 2024 16:09:39 +0200 Subject: [PATCH] package/python-hid: new package A python wrapper for the hidapi library. Signed-off-by: Peter Korsgaard Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/python-hid/Config.in | 15 +++++++++++++++ package/python-hid/python-hid.hash | 5 +++++ package/python-hid/python-hid.mk | 14 ++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 package/python-hid/Config.in create mode 100644 package/python-hid/python-hid.hash create mode 100644 package/python-hid/python-hid.mk diff --git a/DEVELOPERS b/DEVELOPERS index 2054b8be4d..8ebeae1af1 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2506,6 +2506,7 @@ F: package/python-cached-property/ F: package/python-docker/ F: package/python-dockerpty/ F: package/python-docker-pycreds/ +F: package/python-hid/ F: package/python-psutil/ F: package/python-request-id/ F: package/python-semver/ diff --git a/package/Config.in b/package/Config.in index f803ecaed8..deb5d5e10f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1121,6 +1121,7 @@ menu "External python modules" source "package/python-gunicorn/Config.in" source "package/python-h11/Config.in" source "package/python-h2/Config.in" + source "package/python-hid/Config.in" source "package/python-hiredis/Config.in" source "package/python-hkdf/Config.in" source "package/python-hpack/Config.in" diff --git a/package/python-hid/Config.in b/package/python-hid/Config.in new file mode 100644 index 0000000000..3a9e16c9f4 --- /dev/null +++ b/package/python-hid/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PYTHON_HID + bool "python-hid" + depends on BR2_PACKAGE_HAS_UDEV # hidapi + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # hidapi + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # hidapi + select BR2_PACKAGE_HIDAPI + help + ctypes bindings for hidapi. + + https://github.com/apmorton/pyhidapi + +comment "python-hid needs udev /dev management and a toolchain w/ NPTL, gcc >= 4.9" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 diff --git a/package/python-hid/python-hid.hash b/package/python-hid/python-hid.hash new file mode 100644 index 0000000000..d03757771b --- /dev/null +++ b/package/python-hid/python-hid.hash @@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/hid/json +md5 1954df0dce4e15afd89197e898039e92 hid-1.0.6.tar.gz +sha256 48d764d7ae9746ba123b96dbf457893ca80268b7791c4b1d2e051310eeb83860 hid-1.0.6.tar.gz +# Locally computed sha256 checksums +sha256 5524b425acacdfedeca3f959980f0cd38b00176ebbb292e4a96c520d6074353d LICENSE diff --git a/package/python-hid/python-hid.mk b/package/python-hid/python-hid.mk new file mode 100644 index 0000000000..2f65bd1412 --- /dev/null +++ b/package/python-hid/python-hid.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-hid +# +################################################################################ + +PYTHON_HID_VERSION = 1.0.6 +PYTHON_HID_SOURCE = hid-$(PYTHON_HID_VERSION).tar.gz +PYTHON_HID_SITE = https://files.pythonhosted.org/packages/50/b8/5f470948262b6cdda8e1b2382b19f67c57eacda1e07a14322807b911e0ce +PYTHON_HID_SETUP_TYPE = setuptools +PYTHON_HID_LICENSE = MIT +PYTHON_HID_LICENSE_FILES = LICENSE + +$(eval $(python-package))