OSDN Git Service

mkvenv: pass first missing package to diagnose()
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 May 2023 08:18:07 +0000 (10:18 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 May 2023 18:40:29 +0000 (20:40 +0200)
commitd37c21b5fb34aaa01eeabf75a57cf141d76af42f
treeac4b8b242bae67363dff517cea821dfeaf0765e1
parent973038db87154f954e8cd889d706089489a43d46
mkvenv: pass first missing package to diagnose()

If sphinx is present but the theme is not, mkvenv will print an
inaccurate diagnostic:

ERROR: Could not find a version that satisfies the requirement sphinx-rtd-theme>=0.5.0 (from versions: none)
ERROR: No matching distribution found for sphinx-rtd-theme>=0.5.0

'sphinx>=1.6.0' not found:
 • Python package 'sphinx' version '5.3.0' was found, but isn't suitable.
 • mkvenv was configured to operate offline and did not check PyPI.

Instead, ignore the packages that were found to be present, and report
an error based on the first absent package.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
python/scripts/mkvenv.py