diff options
author | Alfredo Deza <alfredo@deza.pe> | 2013-08-22 16:35:26 -0400 |
---|---|---|
committer | Alfredo Deza <alfredo.deza@inktank.com> | 2013-08-22 16:36:18 -0400 |
commit | bdc33af9cf5dbfab52f7e5dbf101e59332f1201d (patch) | |
tree | 1419ed3a27b7109d75254ae737b1427f9d53992e | |
parent | 423b2da1b2ebd6e8daa7ea0303fb28d5a85e6393 (diff) | |
download | ceph-bdc33af9cf5dbfab52f7e5dbf101e59332f1201d.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 - |