]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/prometheus: use vendored "packaging" instead 49712/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 11 Jan 2023 04:12:17 +0000 (12:12 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 11 Jan 2023 12:31:03 +0000 (20:31 +0800)
commitcf6089200d96fc56b08ee17a4e31f19823370dc8
tree80c5b6b13cf0b1fa01646b8f1876ee9eeeee226b
parent58f33d83bc9e39735a25e1d972fcdbeb42c89c9d
mgr/prometheus: use vendored "packaging" instead

instead of using the top-level "packaging" module, use the one
vendored by setuptools.

packaging python module provides versioning defined by PEP-440.
but python3-packaging is provided by CentOS8 powertools repo,
which is not enabled by default. and in CentOS9, this package
is provided by AppStream instead of BaseOS.

as prometheus mgr module is included by ceph-mgr-module-core,
it would be desirable if our user can install ceph-mgr-module-core
without enabling powertools or AppStream repo on a CentOS or
its derivative distros.

fortunately, setuptools vendors packaging module. and both
CentOS8 and CentOS9 provide python3-setuptools in their BaseOS
repos.

in this change, instead of using "packging" module, we use the
venderored one, which is in turn embedded in pkg_resources.
this python module is provided by python3-setuptools on CentOS
distros, and python3-pkg-resources on Debian and its derivatives.

the packaging recipes are updated accordingly to reflect the
new runtime dependency.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
ceph.spec.in
debian/ceph-mgr-modules-core.requires
src/pybind/mgr/prometheus/module.py
src/pybind/mgr/requirements-required.txt