]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: use vendored "packaging" instead 49695/head
authorMatan Breizman <mbreizma@redhat.com>
Wed, 11 Jan 2023 10:57:16 +0000 (10:57 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 11 Jan 2023 17:43:19 +0000 (17:43 +0000)
backport of: cf6089200d96fc56b08ee17a4e31f19823370dc8

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
ceph.spec.in
debian/control
src/pybind/mgr/prometheus/module.py
src/pybind/mgr/requirements.txt

index 1f68736c3209f08d3cca488a8b771c4db6f98573..82fc6b3585e1da27d5776a35006c67d722a11402 100644 (file)
@@ -610,6 +610,7 @@ Requires:       python%{python3_pkgversion}-pecan
 Requires:       python%{python3_pkgversion}-pyOpenSSL
 Requires:       python%{python3_pkgversion}-requests
 Requires:       python%{python3_pkgversion}-dateutil
+Requires:       python%{python3_pkgversion}-setuptools
 %if 0%{?fedora} || 0%{?rhel} >= 8
 Requires:       python%{python3_pkgversion}-cherrypy
 Requires:       python%{python3_pkgversion}-pyyaml
index 4d99ee36f03045173daa55f85c083eb8ea8ecc25..bf89deb4741e303d586a1c2d87047e409395c7b6 100644 (file)
@@ -88,6 +88,7 @@ Build-Depends: automake,
                tox <pkg.ceph.check>,
                python3-coverage <pkg.ceph.check>,
                python3-dateutil <pkg.ceph.check>,
+               python3-pkg-resources <pkg.ceph.check>,
                python3-openssl <pkg.ceph.check>,
                python3-prettytable <pkg.ceph.check>,
                python3-requests <pkg.ceph.check>,
index 55abc27fd70de3850c3c7efd3d2eaf4b40e257f3..1e47e4aa1fe44dfc1aa91cdb4e39d295c85c5ca5 100644 (file)
@@ -1,6 +1,6 @@
 import cherrypy
 from collections import defaultdict
-from packaging.version import Version
+from pkg_resources import packaging  # type: ignore
 import json
 import math
 import os
@@ -32,6 +32,7 @@ DEFAULT_PORT = 9283
 # ipv6 isn't yet configured / supported and CherryPy throws an uncaught
 # exception.
 if cherrypy is not None:
+    Version = packaging.version.Version
     v = Version(cherrypy.__version__)
     # the issue was fixed in 3.2.3. it's present in 3.2.2 (current version on
     # centos:7) and back to at least 3.0.0.
index d2ee6cf63ff8c4bc4c9dcc63f5954b28cabb1a95..252357952701d368c3ff60afc8968ba1cec50e1f 100644 (file)
@@ -9,3 +9,4 @@ execnet
 remoto
 Jinja2
 pyfakefs
+setuptools