All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Li-Wen Hsu" <lwhsu@freebsd.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"John Snow" <jsnow@redhat.com>, "Peter Xu" <peterx@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>, "Warner Losh" <imp@bsdimp.com>,
	qemu-block@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
	"Ed Maste" <emaste@freebsd.org>,
	"Maksim Davydov" <davydov-max@yandex-team.ru>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Kyle Evans" <kevans@freebsd.org>,
	"Michael Roth" <michael.roth@amd.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Yonggang Luo" <luoyonggang@gmail.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 18/19] python: update README.rst to reflect qemu.qmp's removal
Date: Mon, 23 Feb 2026 13:29:00 -0500	[thread overview]
Message-ID: <20260223182902.739189-19-jsnow@redhat.com> (raw)
In-Reply-To: <20260223182902.739189-1-jsnow@redhat.com>

It is no longer simply possible to just use this directory as if it were
an installed package now that it has dependencies, so update the README
to reflect this.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20260218213416.674483-20-jsnow@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/README.rst | 52 ++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 45 insertions(+), 7 deletions(-)

diff --git a/python/README.rst b/python/README.rst
index d62e71528d2..ec5cb5e971b 100644
--- a/python/README.rst
+++ b/python/README.rst
@@ -3,7 +3,17 @@ QEMU Python Tooling
 
 This directory houses Python tooling used by the QEMU project to build,
 configure, and test QEMU. It is organized by namespace (``qemu``), and
-then by package (e.g. ``qemu/machine``, ``qemu/qmp``, etc).
+then by package (e.g. ``qemu/machine``, ``qemu/utils``, etc).
+
+These tools and libraries are installed to the QEMU configure-time
+Python virtual environment by default (see qemu.git/pythondeps.toml
+"tooling" group), and are available for use by any Python script
+executed by the build system. To have these libraries available for
+manual invocations of scripts, use of the "run" script in your build
+directory is recommended.
+
+General structure
+-----------------
 
 ``setup.py`` is used by ``pip`` to install this tooling to the current
 environment. ``setup.cfg`` provides the packaging configuration used by
@@ -20,9 +30,9 @@ environment. ``setup.cfg`` provides the packaging configuration used by
 
 If you append the ``--editable`` or ``-e`` argument to either invocation
 above, pip will install in "editable" mode. This installs the package as
-a forwarder ("qemu.egg-link") that points to the source tree. In so
-doing, the installed package always reflects the latest version in your
-source tree.
+a forwarder that points to the source tree. In so doing, the installed
+package always reflects the latest version in your source tree. This is
+the mode used to install these packages at configure time.
 
 Installing ".[devel]" instead of "." will additionally pull in required
 packages for testing this package. They are not runtime requirements,
@@ -40,8 +50,18 @@ for more information.
 Using these packages without installing them
 --------------------------------------------
 
-These packages may be used without installing them first, by using one
-of two tricks:
+It is no longer recommended to try to use these packages without
+installing them to a virtual environment, but depending on your use
+case, it may still be possible to do.
+
+The "qemu.qmp" library is now hosted outside of the qemu.git repository,
+and the "qemu.machine" library that remains in-tree here has qemu.qmp as
+a dependency. It is possible to install "qemu.qmp" independently and
+then use the rest of these packages without installing them, but be
+advised that if future dependencies are introduced, bypassing the
+installation phase may introduce breakages to your script in the future.
+
+That said, you can use these packages without installing them by either:
 
 1. Set your PYTHONPATH environment variable to include this source
    directory, e.g. ``~/src/qemu/python``. See
@@ -61,8 +81,26 @@ invoke them without installation, you can invoke e.g.:
 
 ``> PYTHONPATH=~/src/qemu/python python3 -m qemu.qmp.qmp_shell``
 
+**It is strongly advised to just use the configure-time venv instead.**
+After running configure, simply use the run script available in the QEMU
+build directory:
+
+``> $builddir/run qmp-shell``
+
 The mappings between console script name and python module path can be
-found in ``setup.cfg``.
+found in ``setup.cfg``, but the console scripts available are listed
+here for reference:
+
+* ``qemu-ga-client``
+* ``qmp-shell``
+* ``qmp-shell-wrap``
+* ``qmp-tui`` (prototype urwid interface for async QMP)
+* ``qom``
+* ``qom-fuse`` (requires fusepy to be installed!)
+* ``qom-get``
+* ``qom-list``
+* ``qom-set``
+* ``qom-tree``
 
 
 Files in this directory
-- 
2.53.0



  parent reply	other threads:[~2026-02-23 18:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 18:28 [PULL 00/19] Python patches John Snow
2026-02-23 18:28 ` [PULL 01/19] python/mkvenv: create timestamp file for each group "ensured" John Snow
2026-02-23 18:28 ` [PULL 02/19] python/mkvenv: bump 'qemu.qmp' dependency for testdeps John Snow
2026-02-23 18:28 ` [PULL 03/19] python/mkvenv: add 'tooling' and 'functests' dependency groups John Snow
2026-02-23 18:28 ` [PULL 04/19] python/mkvenv: add mechanism to install local package(s) John Snow
2026-02-23 18:28 ` [PULL 05/19] meson, mkvenv: add functests custom target John Snow
2026-02-23 18:28 ` [PULL 06/19] tests: Use configured python to run GitLab iotests John Snow
2026-02-23 18:28 ` [PULL 07/19] iotests: tolerate being run outside of pyvenv John Snow
2026-02-23 18:28 ` [PULL 08/19] tests: use "run" script to execute device-crash-test John Snow
2026-02-23 18:28 ` [PULL 09/19] tests/lcitool: update lcitool to latest version John Snow
2026-02-23 18:28 ` [PULL 10/19] tests/lcitool: add python3 wheel and setuptools deps for qemu John Snow
2026-02-23 18:28 ` [PULL 11/19] python: add vendored qemu.qmp package John Snow
2026-02-23 18:28 ` [PULL 12/19] meson, mkvenv: make functional tests depend on functests group John Snow
2026-02-23 18:28 ` [PULL 13/19] meson, mkvenv: add qemu.git/python/qemu package to pythondeps.toml John Snow
2026-02-23 18:28 ` [PULL 14/19] configure: unconditionally install "tooling" group John Snow
2026-02-23 18:28 ` [PULL 15/19] tests: replace check-venv with vm-venv target John Snow
2026-02-23 18:28 ` [PULL 16/19] scripts: nudge users to use 'run' script for scripts that import qemu.qmp John Snow
2026-02-23 18:28 ` [PULL 17/19] python: delete qemu.qmp John Snow
2026-02-23 18:29 ` John Snow [this message]
2026-02-23 18:29 ` [PULL 19/19] python: add setuptools and wheel dependencies John Snow
2026-02-24 11:32 ` [PULL 00/19] Python patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260223182902.739189-19-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=davydov-max@yandex-team.ru \
    --cc=emaste@freebsd.org \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=imp@bsdimp.com \
    --cc=kevans@freebsd.org \
    --cc=kwolf@redhat.com \
    --cc=luoyonggang@gmail.com \
    --cc=lwhsu@freebsd.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.