diff options
author | Alfredo Deza <alfredo@deza.pe> | 2013-08-22 16:35:26 -0400 |
---|---|---|
committer | Gary Lowell <gary.lowell@inktank.com> | 2013-10-10 12:54:03 -0700 |
commit | fba0a3b9f5c8a10e357b29a60905c2fb8c888b63 (patch) | |
tree | 698df2472da774722e97a428b69d25930ba2c827 | |
parent | 5968f45817fd16327a978a6d40fe7167d031c593 (diff) | |
download | ceph-fba0a3b9f5c8a10e357b29a60905c2fb8c888b63.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 - |