@@ -706,6 +706,7 @@ RECIPE_MAINTAINER:pn-python3-pytest = "Trevor Gamblin <tgamblin@baylibre.com>"
RECIPE_MAINTAINER:pn-python3-pytest-subtests = "Tim Orling <tim.orling@konsulko.com>"
RECIPE_MAINTAINER:pn-python3-pytz = "Tim Orling <tim.orling@konsulko.com>"
RECIPE_MAINTAINER:pn-python3-pyyaml = "Tim Orling <tim.orling@konsulko.com>"
+RECIPE_MAINTAINER:pn-python3-qemu-qmp = "Richard Purdie <richard.purdie@linuxfoundation.org>"
RECIPE_MAINTAINER:pn-python3-rdflib = "Wang Mingyu <wangmy@fujitsu.com>"
RECIPE_MAINTAINER:pn-python3-referencing = "Trevor Gamblin <tgamblin@baylibre.com>"
RECIPE_MAINTAINER:pn-python3-requests = "Tim Orling <tim.orling@konsulko.com>"
new file mode 100644
@@ -0,0 +1,28 @@
+SUMMARY = "QEMU Monitor Protocol Python library"
+DESCRIPTION = "An asyncio library for communicating with QEMU Monitor Protocol (QMP). \
+This library was split out of the QEMU source tree to provide a reference QMP \
+implementation usable both within and outside of the QEMU source tree."
+HOMEPAGE = "https://gitlab.com/qemu-project/python-qemu-qmp"
+LICENSE = "LGPL-2.0-only & GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4cf66a4984120007c9881cc871cf49db"
+
+inherit pypi python_setuptools_build_meta
+
+PYPI_PACKAGE = "qemu_qmp"
+
+SRC_URI[sha256sum] = "a3c25d871fab549122b2340810de1f99481002c942a2132476b062aacdbf6e92"
+
+DEPENDS += "python3-setuptools-scm-native"
+
+RDEPENDS:${PN} += "python3-core python3-asyncio"
+
+# Install to the custom path expected by oeqa/utils/qemurunner.py
+# which imports "qmp.legacy" from ${libdir}/qemu-python/
+do_install:append:class-native() {
+ install -d ${D}${libdir}/qemu-python/qmp/
+ cp -R --no-dereference --preserve=mode,links ${S}/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
+}
+
+FILES:${PN}:append:class-native = " ${libdir}/qemu-python"
+
+BBCLASSEXTEND = "native nativesdk"
@@ -5,7 +5,7 @@ require qemu-native.inc
# As some of the files installed by qemu-native and qemu-system-native
# are the same, we depend on qemu-native to get the full installation set
# and avoid file clashes
-DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
+DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native python3-qemu-qmp-native"
EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
@@ -25,9 +25,5 @@ do_install:append() {
rm -rf ${D}${datadir}/qemu/dtb
rm -rf ${D}${datadir}/icons/
rm -rf ${D}${includedir}/qemu-plugin.h
-
- # Install qmp.py to be used with testimage
- install -d ${D}${libdir}/qemu-python/qmp/
- install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
}