diff options
author | Alfredo Deza <alfredo@deza.pe> | 2013-08-22 16:35:26 -0400 |
---|---|---|
committer | Gary Lowell <gary.lowell@inktank.com> | 2013-10-09 10:04:50 -0700 |
commit | e5cb774331baa2b5b3007eb0b65a4f5ce5b61fc9 (patch) | |
tree | 84502b856bf2da4864694981a89bfe930726c75b | |
parent | b08efa8a2db655051ca8e48423837c075722d671 (diff) | |
download | ceph-e5cb774331baa2b5b3007eb0b65a4f5ce5b61fc9.tar.gz |
create a bootstrap file for pybind
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
-rwxr-xr-x | src/pybind/bootstrap | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/pybind/bootstrap b/src/pybind/bootstrap new file mode 100755 index 00000000000..d0dac2f9f71 --- /dev/null +++ b/src/pybind/bootstrap @@ -0,0 +1,60 @@ +#!/bin/sh +set -e + +if command -v lsb_release >/dev/null 2>&1; then + case "$(lsb_release --id --short)" in + Ubuntu|Debian) + for package in python-virtualenv; do + if [ "$(dpkg --status -- $package 2>/dev/null|sed -n 's/^Status: //p')" != "install ok installed" ]; then + # add a space after old values + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required packages, please install them:" 1>&2 + echo " sudo apt-get install $missing" + exit 1 + fi + ;; + esac + + case "$(lsb_release --id --short | awk '{print $1}')" in + openSUSE|SUSE) + for package in python-virtualenv; do + if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required packages, please install them:" 1>&2 + echo " sudo zypper install $missing" + exit 1 + fi + ;; + esac + +else + if [ -f /etc/redhat-release ]; then + case "$(cat /etc/redhat-release | awk '{print $1}')" in + CentOS) + for package in python-virtualenv; do + if [ "$(rpm -qa $package 2>/dev/null)" == "" ]; then + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required packages, please install them:" 1>&2 + echo " sudo yum install $missing" + exit 1 + fi + ;; + esac + fi +fi + +test -d virtualenv || virtualenv virtualenv +cd ceph-argparse && ./virtualenv/bin/python setup.py develop && cd - +cd ceph-rest && ./virtualenv/bin/python setup.py develop && cd - +cd cephfs && ./virtualenv/bin/python setup.py develop && cd - +cd rados && ./virtualenv/bin/python setup.py develop && cd - +cd rbd && ./virtualenv/bin/python setup.py develop && cd - |