]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-deploy-*: install build deps for python3
authorKefu Chai <kchai@redhat.com>
Thu, 1 Oct 2020 10:15:27 +0000 (18:15 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 1 Oct 2020 12:16:57 +0000 (20:16 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-deploy-build/build/build
ceph-deploy-build/build/setup

index b3edfeef6d31c7c19c06f23aef6584f7520bbd7e..e89ec9b98e131de55b4601fb109ddee95c9dc253 100644 (file)
@@ -54,7 +54,11 @@ then
         fi
 
         # Create Tarball
-        python setup.py sdist --formats=bztar
+        if [ "$RELEASE" = 7 ]; then
+            python setup.py sdist --formats=bztar
+        else
+            python3 setup.py sdist --formats=bztar
+        fi
 
         # Build RPM
         mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
index 4fc8b565c9c193354457475f7355797f3e4777ea..7a0baed3d0f91f4cb545418d0618b5a584e7877d 100644 (file)
@@ -11,9 +11,13 @@ set -e
 
 # TODO: use Mock to build ceph-deploy rpm's and avoid this
 
-rpm_deps="python-devel python-virtualenv python-mock python-tox pytest"
-
 if test -f /etc/redhat-release ; then
+    get_rpm_dist
+    if [ "$RELEASE" = 7 ]; then
+        rpm_deps="python-devel python-virtualenv python-mock python-tox pytest"
+    else
+        rpm_deps="python3-devel python3-virtualenv python3-mock python3-tox python3-pytest"
+    fi
     sudo yum install -y $rpm_deps
 fi