Remove libvirt-python from upper-constraints
... when installed from distribution.
This is mostly to fix Ironic's gate as their ecosystem is too
broad and complex to quickly remove libvirt-python from all
possible requirements.txt
More details inline.
See also: https://review.opendev.org/c/openstack/devstack/+/798514
aka f0bf2bdff1
Change-Id: Ic44daf15e952bbe3c424984ffb2474261e68008f
This commit is contained in:
@@ -56,6 +56,17 @@ EOF
|
|||||||
|
|
||||||
# Installs required distro-specific libvirt packages.
|
# Installs required distro-specific libvirt packages.
|
||||||
function install_libvirt {
|
function install_libvirt {
|
||||||
|
# NOTE(yoctozepto): The common consensus [1] is that libvirt-python should
|
||||||
|
# be installed from distro packages. However, various projects might be
|
||||||
|
# trying to ensure it is installed using pip AND use upper-constraints
|
||||||
|
# with that, causing pip to try to upgrade it and to fail.
|
||||||
|
# The following line removes libvirt-python from upper-constraints and
|
||||||
|
# avoids the situation described above. Now only if installed packages
|
||||||
|
# explicitly depend on a newer (or, in general, incompatible) libvirt-python
|
||||||
|
# version, will pip try to reinstall it.
|
||||||
|
# [1] https://review.opendev.org/c/openstack/devstack/+/798514
|
||||||
|
$REQUIREMENTS_DIR/.venv/bin/edit-constraints \
|
||||||
|
$REQUIREMENTS_DIR/upper-constraints.txt -- libvirt-python
|
||||||
|
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
install_package qemu-system libvirt-clients libvirt-daemon-system libvirt-dev python3-libvirt
|
install_package qemu-system libvirt-clients libvirt-daemon-system libvirt-dev python3-libvirt
|
||||||
|
Reference in New Issue
Block a user