diff --git a/bindep.txt b/bindep.txt index ba5c3c6..92b2e05 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,9 +1,17 @@ # This is a cross-platform list tracking distribution packages needed for install and tests; # see https://docs.openstack.org/infra/bindep/ for additional information. +# Due to the nature of libvirt-python package, in DevStack we use the one +# provided in the distro alongside libvirtd - to ensure the two are compatible, +# and also to avoid the pip error when it tries to uninstall the distro version +# (installed in such a way for Nova in DevStack). +# Do note libvirt-python is used only for instance-oriented monitors, so, e.g., +# it is not used by any host monitor. +# TODO(yoctozepto): Refactor code to not require libvirt-python for unit tests, +# basically following how it is handled in nova-compute and ceilometer-compute. # libvirt-dev and pkg-config are required to compile libvirt-python package. -libvirt-dev [platform:dpkg] -pkg-config [platform:dpkg] +libvirt-dev [platform:dpkg test] +pkg-config [platform:dpkg test] libxml2-dev [platform:dpkg test] libxslt-devel [platform:rpm test] diff --git a/releasenotes/notes/libvirt-still-required-22a8d817ee8d0be8.yaml b/releasenotes/notes/libvirt-still-required-22a8d817ee8d0be8.yaml new file mode 100644 index 0000000..722807b --- /dev/null +++ b/releasenotes/notes/libvirt-still-required-22a8d817ee8d0be8.yaml @@ -0,0 +1,11 @@ +--- +other: + - | + *Note to packagers*: ``libvirt-python`` package is still required by + instance-oriented monitors. It is available in most distros as + ``python3-libvirt``. + It is no longer listed in ``requirements.txt`` so it will not get + installed when installing ``masakari-monitors`` package from PyPI. + The change was done to follow how Nova handles this requirement. + This is to satisfy both libvirtd compatibility and recent pip + sanity checks. diff --git a/requirements.txt b/requirements.txt index c4347be..96f6a4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,6 @@ automaton>=1.9.0 # Apache-2.0 keystoneauth1>=3.4.0 # Apache-2.0 -libvirt-python>=6.0.0 # LGPLv2+ openstacksdk>=0.13.0 # Apache-2.0 oslo.concurrency>=3.26.0 # Apache-2.0 oslo.config>=5.2.0 # Apache-2.0 @@ -17,3 +16,10 @@ oslo.privsep>=1.23.0 # Apache-2.0 oslo.service!=1.28.1,>=1.24.0 # Apache-2.0 oslo.utils>=3.33.0 # Apache-2.0 pbr!=2.1.0,>=2.0.0 # Apache-2.0 + +# Due to the nature of libvirt-python package, in DevStack we use the one +# provided in the distro alongside libvirtd - to ensure the two are compatible, +# and also to avoid the pip error when it tries to uninstall the distro version +# (installed in such a way for Nova in DevStack). +# Do note libvirt-python is used only for instance-oriented monitors, so, e.g., +# it is not used by any host monitor. diff --git a/test-requirements.txt b/test-requirements.txt index edf3398..e795de4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,3 +12,13 @@ testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT ddt>=1.0.1 # MIT + +# Due to the nature of libvirt-python package, in DevStack we use the one +# provided in the distro alongside libvirtd - to ensure the two are compatible, +# and also to avoid the pip error when it tries to uninstall the distro version +# (installed in such a way for Nova in DevStack). +# Do note libvirt-python is used only for instance-oriented monitors, so, e.g., +# it is not used by any host monitor. +# TODO(yoctozepto): Refactor code to not require libvirt-python for unit tests, +# basically following how it is handled in nova-compute and ceilometer-compute. +libvirt-python>=6.0.0 # LGPLv2+