Use --no-site-package for services venv's (-nova)

The --system-site-packages option essentially removes the benefits of
virtualenv, nova is a special case because it depends on python-libvirt
which can't be installed via pip.

Change-Id: Ifc3580d4b59a5f1e97de77c0c4a875b123208100
This commit is contained in:
Lucas Alvares Gomes 2013-06-28 16:08:50 +01:00
parent bf3b59b71c
commit 52f02576cf
2 changed files with 10 additions and 1 deletions

View File

@ -63,6 +63,8 @@ git clone https://github.com/stackforge/diskimage-builder.git /opt/stack/diskima
# db
install-packages mysql-server python-mysqldb
# required to build MySQL-pyton
install-packages libmysqlclient-dev
my_cnf=
if [ -f /etc/mysql/my.cnf ]; then

View File

@ -10,7 +10,12 @@ function python-install() {
local svc_root=$2
pushd /opt/stack/venvs
virtualenv --system-site-packages $name
SITE_PCKGS="--no-site-packages"
# Nova depends on python-libvirt which can't be installed via pip
if [ $name == "nova" ]; then
SITE_PCKGS="--system-site-packages"
fi
virtualenv $SITE_PCKGS $name
popd
set +u
@ -28,6 +33,8 @@ function python-install() {
if [ -n "$reqs" ] ; then
PIP_INDEX_URL=http://pypi.openstack.org/openstack/ \
pip install -r $reqs
# FIXME: pip requires doesn't include MySQL-python
pip install MySQL-python
fi
$pip_install $svc_root