From e07d7d005f6298b096d0feb21dcb7e05b0f35ccb Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 1 Oct 2020 18:15:27 +0800 Subject: [PATCH] ceph-deploy-*: install build deps for python3 Signed-off-by: Kefu Chai --- ceph-deploy-build/build/build | 6 +++++- ceph-deploy-build/build/setup | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ceph-deploy-build/build/build b/ceph-deploy-build/build/build index b3edfeef..e89ec9b9 100644 --- a/ceph-deploy-build/build/build +++ b/ceph-deploy-build/build/build @@ -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} diff --git a/ceph-deploy-build/build/setup b/ceph-deploy-build/build/setup index 4fc8b565..7a0baed3 100644 --- a/ceph-deploy-build/build/setup +++ b/ceph-deploy-build/build/setup @@ -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 -- 2.39.5