On 4/24/23 22:02, John Snow wrote:
Some important points as a pre-emptive "FAQ":
- This venv is unconditionally created and lives at {build_dir}/pyvenv.
- The python interpreter used by this venv is always the one identified
by configure. (Which in turn is always the one specified by --python
or $PYTHON)
-*almost* all python scripts in qemu.git executed as part of the build
system, meson, sphinx, avocado tests, vm tests or CI are always
executed within this venv.
(iotests are not yet integrated; I plan to tackle this separately as a
follow-up in order to have a more tightly focused scope on that
series.)
- It remains possible to build and test fully offline.
(In most cases, you just need meson and sphinx from your distro's repo.)
- Distribution packaged 'meson' and 'sphinx' are still utilized whenever
possible as the highest preference.
- Vendored versions of e.g. 'meson' are always preferred to PyPI
versions for speed, repeatability and ensuring tarball builds work
as-is offline.
(Sphinx will not be vendored, just like it already isn't.)
- Missing dependencies, when possible, are fetched and installed
on-demand automatically to make developer environments "just work".
- Works for Python 3.7 and up, on Fedora, OpenSuSE, Red Hat, CentOS,
Alpine, Debian, Ubuntu, NetBSD, OpenBSD, and hopefully everywhere
- No new dependencies (...for most platforms. Debian and NetBSD get an
asterisk.)
- The meson git submodule is unused after this series and can be removed.
Thanks, this looks pretty good. Some changes I'd make for the non-RFC
version:
- I think we should just check in the meson wheel (which also removes
the need for patch 12, so it can be done in its stead) and remove the
submodule
- The verbosity of mkvenv.py can be tuned down and most prints replaced
with logger.info() or logger.debug()
- While I agree with keeping patch 18 separate, I would move it earlier
so that patch 19 can be squashed into patch 14
- I am ambivalent about keeping --enable/--disable-pypi in the first
committed patchset, but in any case I would move patches 16 and 20
before patch 15
Paolo