Skip to content

Use known good releases when installing in pyvenv

Paolo Bonzini qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9python: mkvenv: tweak the matching of --diagnose to depspecspython/scripts/mkvenv.py+4 -10 replies
2/9python: mkvenv: introduce TOML-like representation of dependenciespython/scripts/mkvenv.py+61 -160 replies
3/9python: mkvenv: add ensuregroup commandpython/scripts/mkvenv.py python/setup.cfg pythondeps.toml+151 -10 replies
4/9lcitool: bump libvirt-ci submodule and regeneratetests/docker/dockerfiles/debian-amd64-cross.docker tests/docker/dockerfiles/debian-arm64-cross.docker tests/docker/dockerfiles/debian-armel-cross.docker +13 more+32 -320 replies
5/9configure: never use PyPI for Mesonconfigure+0 -60 replies
6/9python: use vendored tomliconfigure python/scripts/vendor.py python/wheels/tomli-2.0.1-py3-none-any.whl+10 -10 replies
7/9configure: switch to ensuregroupconfigure pythondeps.toml+12 -100 replies
8/9Revert "tests: Use separate virtual environment for avocado".gitlab-ci.d/buildtest.yml docs/devel/acpi-bits.rst docs/devel/testing.rst +7 more+37 -420 replies
9/9tests/docker: add python3-tomli dependency to containers.gitlab-ci.d/cirrus/freebsd-13.vars .gitlab-ci.d/cirrus/macos-12.vars tests/docker/dockerfiles/centos8.docker +19 more+77 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] Use known good releases when installing in pyvenv

This series introduce a new installation command for mkvenv.py that retrieves the packages to be installed from a TOML file. This allows being more flexible in using the system version of a package, while at the same time using a known-good version when installing the package. This is important for packages that sometimes have backwards-incompatible changes or that depend on specific versions of their dependencies.

For example, in the case of sphinx we can always use the last version that supports older versions of Python and especially docutils (Ubuntu 20.04 for example would not support sphinx 6.0), and in the case of Avocado we can avoid installing a package that conflicts with any plugins already existing in the system package path. This in turn enables using the same virtual environment for both the build and qemu-iotests. John has patches for this.

For the configuration file, TOML was chosen because it was more human readable and easier to edit than JSON. A parser is available in the Python 3.11 standard library; for older versions, the API-compatible replacement tomli is very small (12k). I am introducing it as a vendored .whl file because it is not installed by default in most distros (unlike pip and setuptools which were introduced in 8.0) and because Debian 11 only has it in bullseye-backports. However, if preferred the patch "python: use vendored tomli" can be dropped. In that case, tomli will have to be installed from either PyPI or bullseye-backports.

While tomli is bundled with pip, this is only true of recent versions of pip. Of all the supported OSes pretty much only FreeBSD has a recent enough version of pip while staying on Python <3.11. So we cannot use the same trick that is in place for distlib.

In order to pick the tomli mapping, lcitool is updated to a recent version. As a side effect this updates from LEAP 15.4 to 15.5.

Paolo

Paolo Bonzini (9):
python: mkvenv: tweak the matching of --diagnose to depspecs
python: mkvenv: introduce TOML-like representation of dependencies
python: mkvenv: add ensuregroup command
lcitool: bump libvirt-ci submodule and regenerate
configure: never use PyPI for Meson
python: use vendored tomli
configure: switch to ensuregroup
Revert "tests: Use separate virtual environment for avocado" tests/docker: add python3-tomli dependency to containers

 .gitlab-ci.d/buildtest.yml                    |   6 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars           |   2 +-
 .gitlab-ci.d/cirrus/macos-12.vars             |   2 +-
 configure                                     |  22 +-
 docs/devel/acpi-bits.rst                      |   6 +-
 docs/devel/testing.rst                        |  14 +-
 python/scripts/mkvenv.py                      | 201 ++++++++++++++++--
 python/scripts/vendor.py                      |   5 +-
 python/setup.cfg                              |   9 +
 python/wheels/tomli-2.0.1-py3-none-any.whl    | Bin 0 -> 12757 bytes
 pythondeps.toml                               |  32 +++
 .../org.centos/stream/8/x86_64/test-avocado   |   4 +-
 scripts/device-crash-test                     |   2 +-
 tests/Makefile.include                        |  19 +-
 tests/docker/dockerfiles/centos8.docker       |   3 +-
 .../dockerfiles/debian-all-test-cross.docker  |   7 +-
 .../dockerfiles/debian-amd64-cross.docker     |   6 +-
 tests/docker/dockerfiles/debian-amd64.docker  |   4 +
 .../dockerfiles/debian-arm64-cross.docker     |   6 +-
 .../dockerfiles/debian-armel-cross.docker     |   6 +-
 .../dockerfiles/debian-armhf-cross.docker     |   6 +-
 .../dockerfiles/debian-hexagon-cross.docker   |   6 +-
 .../dockerfiles/debian-mips64el-cross.docker  |   6 +-
 .../dockerfiles/debian-mipsel-cross.docker    |   6 +-
 .../dockerfiles/debian-ppc64el-cross.docker   |   6 +-
 .../dockerfiles/debian-riscv64-cross.docker   |   2 +-
 .../dockerfiles/debian-s390x-cross.docker     |   6 +-
 .../dockerfiles/debian-tricore-cross.docker   |   2 +
 .../dockerfiles/fedora-i386-cross.docker      |   1 +
 .../dockerfiles/fedora-win32-cross.docker     |   2 +-
 .../dockerfiles/fedora-win64-cross.docker     |   2 +-
 tests/docker/dockerfiles/opensuse-leap.docker |  23 +-
 tests/docker/dockerfiles/ubuntu2004.docker    |   4 +-
 tests/docker/dockerfiles/ubuntu2204.docker    |   1 +
 tests/lcitool/libvirt-ci                      |   2 +-
 tests/lcitool/mappings.yml                    |  27 ++-
 tests/lcitool/projects/qemu.yml               |   3 +-
 tests/lcitool/targets/opensuse-leap-15.yml    |   4 +-
 tests/requirements.txt                        |   6 -
 tests/vm/Makefile.include                     |   2 +-
 tests/vm/generated/freebsd.json               |   1 +
 41 files changed, 371 insertions(+), 103 deletions(-)
 create mode 100644 python/wheels/tomli-2.0.1-py3-none-any.whl
 create mode 100644 pythondeps.toml
 delete mode 100644 tests/requirements.txt
Signature · 1 line
2.41.0