]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: install python2-{virtualenv,devel} on SUSE if needed 32208/head
authorNathan Cutler <ncutler@suse.com>
Tue, 10 Dec 2019 17:13:49 +0000 (18:13 +0100)
committerNathan Cutler <ncutler@suse.com>
Thu, 12 Dec 2019 15:57:41 +0000 (16:57 +0100)
Recent versions of openSUSE are fully Python 3 systems, but Python 2 can still
be installed on them. When Python 2 *and* Python 3 are installed, tox will try
to run unit tests ("make check" tests) on both. But the spec-file-based
mechanism used by install-deps.sh for determining "make check" dependencies only
installs python3-virtualenv and python3-devel.

Fixes: https://tracker.ceph.com/issues/23981
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit a5a44cf42eb310563056da0fcf31279d2ad1c4e3)

Conflicts:
install-deps.sh

install-deps.sh

index 5034b64a8080321f213938c5694cd2fb02f79e83..594fc4db59d4bb02403ba550859baa4a8e7a6691 100755 (executable)
@@ -376,6 +376,10 @@ else
         echo "Using zypper to install dependencies"
         zypp_install="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
         $SUDO $zypp_install systemd-rpm-macros rpm-build || exit 1
+        if [ -e /usr/bin/python2 ] ; then
+            # see https://tracker.ceph.com/issues/23981
+            $SUDO $zypp_install python2-virtualenv python2-devel || exit 1
+        fi
         munge_ceph_spec_in $for_make_check $DIR/ceph.spec
         $SUDO $zypp_install $(rpmspec -q --buildrequires $DIR/ceph.spec) || exit 1
         $SUDO $zypp_install libxmlsec1-1 libxmlsec1-nss1 libxmlsec1-openssl1 xmlsec1-devel xmlsec1-openssl-devel