From 71ed611cd47d961e1897721d7d002ffb498221d4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 8 Aug 2023 10:03:42 +0200 Subject: python: mkvenv: add ensuregroup command Introduce a new subcommand 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. Compared to JSON, TOML is more human readable and easier to edit. A parser is available in 3.11 but also available as a small (12k) package for older versions, tomli. 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. Signed-off-by: Paolo Bonzini --- python/setup.cfg | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/setup.cfg') diff --git a/python/setup.cfg b/python/setup.cfg index 5d7e95f5d2..e74b58a8c2 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -94,6 +94,12 @@ allow_subclassing_any = True [mypy-fuse] ignore_missing_imports = True +[mypy-tomli] +ignore_missing_imports = True + +[mypy-tomllib] +ignore_missing_imports = True + [mypy-urwid] ignore_missing_imports = True -- cgit 1.4.1