Use pip to install the package

The installation by pip do not deeply scan requirements. For example it
allows
SQLAlchemy==1.0.5
sqlalchemy-migrate==0.9.6
for requirements
SQLAlchemy>=0.9.7,<1.1.0
sqlalchemy-migrate>=0.9.6
despite sqlalchemy-migreate v0.9.6 requires SQLAlchemy<=0.9.99.

The installation by direct call of setup.py downgrades installed
packages of DefStack installation, which may lead to problems.

Since DevStack uses pip to install packages, ec2api should install
packages by the same manner.

Change-Id: Ie2c977be69d83595f65ddb9a03fbdb6f8f3c8db8
This commit is contained in:
Feodor Tersin 2015-06-29 16:17:40 +03:00
parent f64151e821
commit c72d53d7ef
1 changed files with 4 additions and 1 deletions

View File

@ -310,8 +310,11 @@ sudo rm -f $AUTH_CACHE_DIR/*
echo Installing package
if [[ -z "$VIRTUAL_ENV" ]]; then
SUDO_PREFIX="sudo"
if ! command -v pip >/dev/null; then
sudo apt-get install python-pip
fi
fi
$SUDO_PREFIX python setup.py develop
$SUDO_PREFIX pip install -e ./
$SUDO_PREFIX rm -rf build ec2_api.egg-info
#recreate database