mkvenv: always pass locally-installed packages to pip
commit47a90a51a9c24ba10c58c0cd09d2117cf9e3fde2
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Jun 2023 08:14:45 +0000 (6 10:14 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Jun 2023 14:30:01 +0000 (6 16:30 +0200)
tree5f07a4dd85e7b80ec5ba0ac620fa2bb306519ff7
parente8e4298feadae7924cf7600bb3bcc5b0a8d7cbe9
mkvenv: always pass locally-installed packages to pip

Let pip decide whether a new version should be installed or the current
one is okay.  This ensures that the virtual environment is updated
(either upgraded or downgraded) whenever a new version of a package is
requested.

The hardest part here is figuring out if a package is installed in
the venv (which also has to be done twice to account for the presence
of either setuptools in Python <3.8, or importlib in Python >=3.8).

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Cc: John Snow <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
python/scripts/mkvenv.py