package/python-pyusb: enable host variant

The host variant of python-pyusb will be neded for Snagboot, so it is
enabled with this commit. In addition, we're adding a very simple test
case to validate that host-python-pyusb minimally works.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Thomas Petazzoni 2025-10-18 21:43:04 +02:00 committed by Julien Olivain
commit 20afa3be7c
3 changed files with 12 additions and 0 deletions

View file

@ -3289,6 +3289,7 @@ F: support/testing/tests/package/test_python_crccheck.py
F: support/testing/tests/package/test_python_flask.py
F: support/testing/tests/package/test_python_flask_expects_json.py
F: support/testing/tests/package/test_python_git.py
F: support/testing/tests/package/test_python_pyusb.py
F: support/testing/tests/package/test_python_serial.py
F: support/testing/tests/package/test_python_unittest_xml_reporting.py
F: support/testing/tests/toolchain/test_external_arm.py

View file

@ -11,5 +11,7 @@ PYTHON_PYUSB_LICENSE = BSD-3-Clause
PYTHON_PYUSB_LICENSE_FILES = LICENSE
PYTHON_PYUSB_SETUP_TYPE = setuptools
PYTHON_PYUSB_DEPENDENCIES = host-python-setuptools-scm libusb
HOST_PYTHON_PYUSB_DEPENDENCIES = host-python-setuptools-scm host-libusb
$(eval $(python-package))
$(eval $(host-python-package))

View file

@ -0,0 +1,9 @@
import infra.basetest
class TestHostPythonPyusb(infra.basetest.BRHostPkgTest):
hostpkgs = ["host-python-pyusb"]
def test_run(self):
cmd = ["host/bin/python3", "-c", "import usb"]
infra.run_cmd_on_host(self.builddir, cmd)