]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/install: normalize python3 packages to python36 ones 1276/head
authorKefu Chai <kchai@redhat.com>
Thu, 11 Apr 2019 02:20:58 +0000 (10:20 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 11 Apr 2019 02:21:05 +0000 (10:21 +0800)
EPEL7 has switched over to python3.6 as the main python3. and we started
packaging python bindings for python3.6 since
https://github.com/ceph/ceph-build/pull/1283

Signed-off-by: Kefu Chai <kchai@redhat.com>
teuthology/task/install/rpm.py

index 2ac418c7dfb31d71d1dc08848c88b3f73f99c3c9..3eed1b7c5c11cf4c9a60d25a4f59d743b4ad3946 100644 (file)
@@ -59,8 +59,14 @@ def _remove(ctx, config, remote, rpm):
 
 def _package_overrides(pkgs, os):
     """
-    Replaces some package names with their distro-specific equivalents
-    (currently "python3-*" -> "python34-*" for CentOS)
+    Replaces some package names with their distro-specific equivalents.
+
+    CentOS/RHEL-7 is not fully migrated to python3 at the time of writing,
+    we are using EPEL7 for building python3 packages. and we use the rpm
+    macro of "python3_pkgversion" as the python3 version for which we build
+    python bindings. see https://src.fedoraproject.org/cgit/rpms/python-rpm-macros.git/commit/macros.python-srpm?h=epel7 for its latest definition.
+
+    (currently "python3-*" -> "python36-*" for CentOS)
 
     :param pkgs: list of RPM package names
     :param os: the teuthology.orchestra.opsys.OS object
@@ -70,7 +76,7 @@ def _package_overrides(pkgs, os):
     for pkg in pkgs:
         if is_rhel:
             if pkg.startswith('python3-') or pkg == 'python3':
-                pkg = pkg.replace('3', '34', 1)
+                pkg = pkg.replace('python3', 'python36', 1)
         result.append(pkg)
     return result