Package: src:hidapi-cffi Version: 0.2.1-1 Severity: serious Tags: patch Justification: Policy 7.2
Upstream only declares > setup_requires=['cffi >= 0.8'] But that's insufficient, it actually requires cffi at runtime, the first line is: > from cffi import FFI It's worth noting that in Debian we split the cffi package from the cffi-backend package. We assume that cffi packages are using the out-of-line modes, and they only need the cffi-backend. So, when a package declares cffi in install_requires, we generate a dependency on the cffi-backend package. But this package is using the in-line ABI mode (see [0] for an explanation of the modes). So it will need an explicit dependency on cffi, even if upstream fixes setup.py [0]: https://cffi.readthedocs.io/en/latest/overview.html Patch attached: dependencies.patch Also, I noticed a bunch of things in debian/rules that pybulid can do for you, so there's a second patch: pybulid.patch. SR
diff -Nru hidapi-cffi-0.2.1/debian/control hidapi-cffi-0.2.1/debian/control --- hidapi-cffi-0.2.1/debian/control 2015-06-25 13:35:38.000000000 -0700 +++ hidapi-cffi-0.2.1/debian/control 2016-09-06 22:04:59.000000000 -0700 @@ -7,14 +7,14 @@ Package: python-hidapi Architecture: any -Depends: ${misc:Depends}, ${python:Depends}, libhidapi-hidraw0 | libhidapi-libusb0 +Depends: ${misc:Depends}, ${python:Depends}, libhidapi-hidraw0 | libhidapi-libusb0, python-cffi (>= 0.8) Description: Python bindings for the HID API Python bindings for libhidapi for working with Human Interface Devices such as mouses and keyboards. Package: python3-hidapi Architecture: any -Depends: ${misc:Depends}, ${python3:Depends}, libhidapi-hidraw0 | libhidapi-libusb0 +Depends: ${misc:Depends}, ${python3:Depends}, libhidapi-hidraw0 | libhidapi-libusb0, python3-cffi (>= 0.8) Description: Python bindings for the HID API Python bindings for libhidapi for working with Human Interface Devices such as mouses and keyboards.
diff -Nru hidapi-cffi-0.2.1/debian/clean hidapi-cffi-0.2.1/debian/clean --- hidapi-cffi-0.2.1/debian/clean 1969-12-31 16:00:00.000000000 -0800 +++ hidapi-cffi-0.2.1/debian/clean 2016-09-06 22:04:59.000000000 -0700 @@ -0,0 +1 @@ +hidapi_cffi.egg-info/* diff -Nru hidapi-cffi-0.2.1/debian/rules hidapi-cffi-0.2.1/debian/rules --- hidapi-cffi-0.2.1/debian/rules 2015-06-25 13:08:50.000000000 -0700 +++ hidapi-cffi-0.2.1/debian/rules 2016-09-06 22:04:59.000000000 -0700 @@ -1,26 +1,6 @@ #!/usr/bin/make -f -# This file was automatically generated by stdeb 0.8.2 at -# Thu, 09 Oct 2014 22:55:33 +0300 -PYTHONS:=$(shell pyversions -vr) -PYTHON3S:=$(shell py3versions -vr) export PYBUILD_NAME=hidapi + %: dh $@ --with python2,python3 --buildsystem=pybuild - -override_dh_clean: - dh_clean -O--buildsystem=pybuild - rm -rf build - rm -rf __pycache__ - -override_dh_install: - set -e ; for pyvers in $(PYTHONS); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python-hidapi; \ - done - set -e ; for pyvers in $(PYTHON3S); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python3-hidapi; \ - done - rm -rf $(CURDIR)/debian/python*-hidapi/usr/lib/python*/dist-packages/*.pth - rm -rf $(CURDIR)/debian/python*-hidapi/usr/lib/python3.*