package/python-pyudev: depend on libudev instead of udev
PATCH 1/2 package/python-pyudev: depend on libudev instead of udev
Commit 3f24135c56f6aa8f0524307b7339512fecfa6f92 ("package/libinput:
only needs libudev, not udev daemon") changed libinput to depend on libudev instead of udev.
However, BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS selects BR2_PACKAGE_PYTHON_PYUDEV, which depends on udev, causing a broken dependency chain:
WARNING: unmet direct dependencies detected for BR2_PACKAGE_PYTHON_PYUDEV
Depends on [n]: BR2_PACKAGE_PYTHON3 [=y] && BR2_PACKAGE_HAS_UDEV [=n]
Selected by [y]:
- BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS [=y] && BR2_PACKAGE_LIBINPUT [=y] && BR2_PACKAGE_PYTHON3 [=y]
Turns out that after experimenting, the majority of the pyudev functionality works fine with just libudev. Only pyudev.udev_version() has been detected as not working as it calls into udevadm. But the actual features to enumerate devices and get their characteristics just fine.
So, to fix the issue, we change the dependency of python-pyudev to just libudev instead of udev.
--- package/python-pyudev/Config.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
package/python-pyudev/Config.in +3 -3
@@ -1,6 +1,6 @@ config BR2_PACKAGE_PYTHON_PYUDEV bool "python-pyudev" - depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_PACKAGE_HAS_LIBUDEV select BR2_PACKAGE_PYTHON3_ZLIB # runtime help pyudev is a LGPL licenced, pure Python 2/3 binding to
@@ -9,5 +9,5 @@ config BR2_PACKAGE_PYTHON_PYUDEV https://github.com/pyudev/pyudev -comment "python-pyudev needs udev /dev management" - depends on !BR2_PACKAGE_HAS_UDEV +comment "python-pyudev needs libudev" + depends on !BR2_PACKAGE_HAS_LIBUDEV
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 support/testing: add pyudev test
In order to verify that pyudev works fine, including with just libudev-zero, add a basic test for this package.
--- DEVELOPERS | 2 ++ .../testing/tests/package/sample_python_pyudev.py | 4 ++++ support/testing/tests/package/test_python_pyudev.py | 12 ++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 support/testing/tests/package/sample_python_pyudev.py create mode 100644 support/testing/tests/package/test_python_pyudev.py
DEVELOPERS +2 -0
@@ -3285,6 +3285,7 @@ F: support/testing/tests/package/sample_python_augeas.py F: support/testing/tests/package/sample_python_flask.py F: support/testing/tests/package/sample_python_flask_expects_json.py F: support/testing/tests/package/sample_python_git.py +F: support/testing/tests/package/sample_python_pyudev.py F: support/testing/tests/package/sample_python_unittest_xml_reporting.py F: support/testing/tests/package/test_nodejs.py F: support/testing/tests/package/test_python_augeas.py
@@ -3294,6 +3295,7 @@ F: support/testing/tests/package/test_python_flask_expects_json.py F: support/testing/tests/package/test_python_fs.py F: support/testing/tests/package/test_python_git.py F: support/testing/tests/package/test_python_pyfatfs.py +F: support/testing/tests/package/test_python_pyudev.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_snagboot.py
support/testing/tests/package/sample_python_pyudev.py new file +4 -0
@@ -0,0 +1,4 @@ +import pyudev + +context = pyudev.Context() +assert('/dev/ttyAMA0' in [ d.device_node for d in context.list_devices() ])
support/testing/tests/package/test_python_pyudev.py new file +12 -0
@@ -0,0 +1,12 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestPythonPy3PyUdev(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_LIBUDEV_ZERO=y + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_PYTHON_PYUDEV=y + """ + sample_scripts = ["tests/package/sample_python_pyudev.py"]
Signature · 6 lines
2.55.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 20 lines · Thomas Petazzoni via buildroot
Commit
3f24135c56f6aa8f0524307b7339512fecfa6f92("package/libinput:
only needs libudev, not udev daemon") changed libinput to depend on libudev instead of udev.However,
BR2_PACKAGE_LIBINPUT_PYTHON_TOOLSselectsBR2_PACKAGE_PYTHON_PYUDEV, which depends on udev, causing a broken dependency chain:WARNING: unmet direct dependencies detected for
BR2_PACKAGE_PYTHON_PYUDEV
Depends on [n]:BR2_PACKAGE_PYTHON3[=y] &&BR2_PACKAGE_HAS_UDEV[=n] Selected by [y]:
-BR2_PACKAGE_LIBINPUT_PYTHON_TOOLS[=y] &&BR2_PACKAGE_LIBINPUT[=y]
&&BR2_PACKAGE_PYTHON3[=y]Turns out that after experimenting, the majority of the pyudev functionality works fine with just libudev. Only
pyudev.udev_version()has been detected as not working as it calls into udevadm. But the actual features to enumerate devices and get their characteristics just fine.
Quoted 4 lines
So, to fix the issue, we change the dependency of python-pyudev to just libudev instead of udev.
Signed-off-by Thomas Petazzoni <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot