Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Install fuel-plugin-builder pip for fuel-odl-plugin build
[releng.git]
/
utils
/
lab-reconfiguration
/
create_venv.sh
diff --git
a/utils/lab-reconfiguration/create_venv.sh
b/utils/lab-reconfiguration/create_venv.sh
index
19d9b49
..
4e45f84
100755
(executable)
--- a/
utils/lab-reconfiguration/create_venv.sh
+++ b/
utils/lab-reconfiguration/create_venv.sh
@@
-7,11
+7,11
@@
BASEDIR=`dirname $0`
function venv_install() {
if command -v virtualenv-2.7; then
function venv_install() {
if command -v virtualenv-2.7; then
- virtualenv-2.7 $1
+ virtualenv-2.7
-p python2.7
$1
elif command -v virtualenv2; then
elif command -v virtualenv2; then
- virtualenv2 $1
+ virtualenv2
-p python2.7
$1
elif command -v virtualenv; then
elif command -v virtualenv; then
- virtualenv $1
+ virtualenv
-p python2.7
$1
else
echo Cannot find virtualenv command.
return 1
else
echo Cannot find virtualenv command.
return 1
@@
-25,6
+25,11
@@
if [ ! -d "$BASEDIR/venv" ]; then
echo "Virtualenv created."
fi
echo "Virtualenv created."
fi
+if [[ ! $(rpm -qa | grep python-2.7) ]]; then
+ echo "Python 2.7 not found, but required...attempting to install"
+ sudo yum install -y python-2.7*
+fi
+
if [ ! -f "$BASEDIR/venv/updated" -o $BASEDIR/requirements.pip -nt $BASEDIR/venv/updated ]; then
source $BASEDIR/venv/bin/activate
pip install -r $BASEDIR/requirements.pip
if [ ! -f "$BASEDIR/venv/updated" -o $BASEDIR/requirements.pip -nt $BASEDIR/venv/updated ]; then
source $BASEDIR/venv/bin/activate
pip install -r $BASEDIR/requirements.pip