All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usbutils: Split out lsusb.py
@ 2018-02-05 12:25 Martin Hundebøll
  2018-02-05 12:25 ` [PATCH] bind: add packageconfig for python-support Martin Hundebøll
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Hundebøll @ 2018-02-05 12:25 UTC (permalink / raw)
  To: OE-core; +Cc: Alexander Kanavin

The pretty-printing "lsusb.py" script shipped by usbutils is currently
useless, as it doesn't runtime depend on python, and has unversioned
python in the shebang.

Avoid adding a python dependency to current configurations with usbutils
buy splitting lsusb.py into a usbutils-python package, and make it
runtime depend on python3-core.

Make the script usable by replacing the shebang with a direct call to
${bindir}/python3.

Signed-off-by: Martin Hundebøll <mnhu@prevas.dk>
---
 meta/recipes-bsp/usbutils/usbutils_009.bb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/recipes-bsp/usbutils/usbutils_009.bb b/meta/recipes-bsp/usbutils/usbutils_009.bb
index 30522fd0f1..a7cbe45406 100644
--- a/meta/recipes-bsp/usbutils/usbutils_009.bb
+++ b/meta/recipes-bsp/usbutils/usbutils_009.bb
@@ -22,3 +22,11 @@ FILES_${PN}-dev += "${datadir}/pkgconfig"
 
 RRECOMMENDS_${PN} = "udev-hwdb"
 RDEPENDS_${PN}-ptest = "libboost-system libboost-thread"
+
+PACKAGE_BEFORE_PN =+ "${PN}-python"
+FILES_${PN}-python += "${bindir}/lsusb.py"
+RDEPENDS_${PN}-python = "python3-core"
+
+do_install_append() {
+    sed -i -E '1s,#!.+python,#!${bindir}/python3,' ${D}${bindir}/lsusb.py
+}
-- 
2.16.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-23  3:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-05 12:25 [PATCH] usbutils: Split out lsusb.py Martin Hundebøll
2018-02-05 12:25 ` [PATCH] bind: add packageconfig for python-support Martin Hundebøll
2018-02-05 12:49   ` Richard Purdie
2018-02-05 12:51     ` Martin Hundebøll
2018-02-13  6:21   ` Martin Hundebøll
2018-02-21 14:22     ` Burton, Ross
2018-02-22 13:40       ` [PATCH v2] " Martin Hundebøll

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.