Fix stackforge_libs installation step

When stackforge_libs is enabled, the WSME and Pecan libraries
are checked out from stackforge and installed from source instead of
pip. This change introduces a new function to perform the installation
without attempting to sync the global requirements list, since the
version of setup.py in the global requirements repository breaks the
dependencies for WSME (there is no ipaddr library in python 2, so we
need to install it, but under python 3 where it is part of the stdlib we
cannot include it in the requirements).

Fixes bug 1252488

Change-Id: I58357757ac67a919bf70178b76f65fa0a9e16242
This commit is contained in:
Doug Hellmann 2013-11-18 22:12:46 +00:00
parent c85ac787ba
commit aaac4eede9
2 changed files with 20 additions and 6 deletions

View File

@ -1250,7 +1250,11 @@ function safe_chmod() {
# ``pip install -e`` the package, which processes the dependencies
# using pip before running `setup.py develop`
# Uses globals ``STACK_USER``, ``TRACK_DEPENDS``, ``REQUIREMENTS_DIR``
#
# Updates the dependencies in project_dir from the
# openstack/requirements global list before installing anything.
#
# Uses globals ``TRACK_DEPENDS``, ``REQUIREMENTS_DIR``
# setup_develop directory
function setup_develop() {
local project_dir=$1
@ -1266,9 +1270,7 @@ function setup_develop() {
$SUDO_CMD python update.py $project_dir)
fi
pip_install -e $project_dir
# ensure that further actions can do things like setup.py sdist
safe_chown -R $STACK_USER $1/*.egg-info
setup_develop_no_requirements_update $project_dir
# We've just gone and possibly modified the user's source tree in an
# automated way, which is considered bad form if it's a development
@ -1285,6 +1287,18 @@ function setup_develop() {
fi
}
# ``pip install -e`` the package, which processes the dependencies
# using pip before running `setup.py develop`
# Uses globals ``STACK_USER``
# setup_develop_no_requirements_update directory
function setup_develop_no_requirements_update() {
local project_dir=$1
pip_install -e $project_dir
# ensure that further actions can do things like setup.py sdist
safe_chown -R $STACK_USER $1/*.egg-info
}
# Service wrapper to start services
# start_service service-name

View File

@ -39,10 +39,10 @@ function install_stackforge() {
cleanup_stackforge
git_clone $WSME_REPO $WSME_DIR $WSME_BRANCH
setup_develop $WSME_DIR
setup_develop_no_requirements_update $WSME_DIR
git_clone $PECAN_REPO $PECAN_DIR $PECAN_BRANCH
setup_develop $PECAN_DIR
setup_develop_no_requirements_update $PECAN_DIR
}
# cleanup_stackforge() - purge possibly old versions of stackforge libraries