qemu/python/tests
John Snow c5538eed12 mkvenv: add ensure subcommand
This command is to be used to add various packages (or ensure they're
already present) into the configure-provided venv in a modular fashion.

Examples:

mkvenv ensure --online --dir "${source_dir}/python/wheels/" "meson>=0.61.5"
mkvenv ensure --online "sphinx>=1.6.0"
mkvenv ensure "qemu.qmp==0.0.2"

It's designed to look for packages in three places, in order:

(1) In system packages, if the version installed is already good
enough. This way your distribution-provided meson, sphinx, etc are
always used as first preference.

(2) In a vendored packages directory. Here I am suggesting
qemu.git/python/wheels/ as that directory. This is intended to serve as
a replacement for vendoring the meson source for QEMU tarballs. It is
also highly likely to be extremely useful for packaging the "qemu.qmp"
package in source distributions for platforms that do not yet package
qemu.qmp separately.

(3) Online, via PyPI, ***only when "--online" is passed***. This is only
ever used as a fallback if the first two sources do not have an
appropriate package that meets the requirement. The ability to build
QEMU and run tests *completely offline* is not impinged.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-7-jsnow@redhat.com>
[Use distlib to lookup distributions. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-05-18 08:53:51 +02:00
..
flake8.sh python: add mkvenv.py 2023-05-18 08:53:51 +02:00
iotests-mypy.sh python: Add iotest linters to test suite 2021-11-01 11:54:59 -04:00
iotests-pylint.sh Python: add setuptools v60.0 workaround 2022-02-23 17:07:26 -05:00
isort.sh python: add mkvenv.py 2023-05-18 08:53:51 +02:00
minreqs.txt mkvenv: add ensure subcommand 2023-05-18 08:53:51 +02:00
mypy.sh python: add mkvenv.py 2023-05-18 08:53:51 +02:00
protocol.py python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
pylint.sh python: add mkvenv.py 2023-05-18 08:53:51 +02:00