On Wed, Aug 9, 2023 at 5:29 AM Paolo Bonzini <pbonz...@redhat.com> wrote:
>
> 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

I'm still nose to the grindstone trying to finish up the asyncio
machine demo, but I made good progress today and I'll try to get a
good look at this ASAP.
(But, I suppose we're both about to pop out for PTO soon, so...)

>
>
> 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
>
> --
> 2.41.0
>


Reply via email to