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
diff --git a/functions b/functions
index effdc53..ebccb59 100644
--- a/functions
+++ b/functions
@@ -1250,7 +1250,11 @@
# ``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 @@
$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 @@
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
diff --git a/lib/stackforge b/lib/stackforge
index 4b79de0..718b818 100644
--- a/lib/stackforge
+++ b/lib/stackforge
@@ -39,10 +39,10 @@
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