Update projects to global requirements before setup
We've agreed that we should be using global requirements, so force projects to be updated to global requirements before we test them. Co-Authored-With: Monty Taylor <mordred@inaugust.com> Change-Id: I0652f639673e600fd7508a9869ec85f8d5ce4518
This commit is contained in:
parent
f3d5045ebd
commit
6c84463071
28
functions
28
functions
@ -1131,18 +1131,32 @@ function service_check() {
|
||||
# Uses globals ``STACK_USER``, ``TRACK_DEPENDES``, ``*_proxy`
|
||||
# setup_develop directory
|
||||
function setup_develop() {
|
||||
local project_dir=$1
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
SUDO_CMD="env"
|
||||
else
|
||||
SUDO_CMD="sudo"
|
||||
fi
|
||||
$SUDO_CMD \
|
||||
HTTP_PROXY=$http_proxy \
|
||||
HTTPS_PROXY=$https_proxy \
|
||||
NO_PROXY=$no_proxy \
|
||||
pip install -e $1
|
||||
# ensure that further actions can do things like setup.py sdist
|
||||
$SUDO_CMD chown -R $STACK_USER $1/*.egg-info
|
||||
|
||||
echo "cd $REQUIREMENTS_DIR; $SUDO_CMD python update.py $project_dir"
|
||||
|
||||
(cd $REQUIREMENTS_DIR; \
|
||||
$SUDO_CMD python update.py $project_dir)
|
||||
|
||||
for reqs_file in $project_dir/requirements.txt $project_dir/tools/pip-requires ; do
|
||||
if [ -f $reqs_file ] ; then
|
||||
pip_install -r $reqs_file
|
||||
fi
|
||||
done
|
||||
|
||||
(cd $project_dir; \
|
||||
python setup.py egg_info; \
|
||||
$SUDO_CMD \
|
||||
HTTP_PROXY=$http_proxy \
|
||||
HTTPS_PROXY=$https_proxy \
|
||||
NO_PROXY=$no_proxy \
|
||||
python setup.py develop \
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
2
stack.sh
2
stack.sh
@ -647,7 +647,7 @@ TRACK_DEPENDS=${TRACK_DEPENDS:-False}
|
||||
# Install python packages into a virtualenv so that we can track them
|
||||
if [[ $TRACK_DEPENDS = True ]]; then
|
||||
echo_summary "Installing Python packages into a virtualenv $DEST/.venv"
|
||||
install_package python-virtualenv
|
||||
pip_install -U virtualenv
|
||||
|
||||
rm -rf $DEST/.venv
|
||||
virtualenv --system-site-packages $DEST/.venv
|
||||
|
Loading…
Reference in New Issue
Block a user