Actually install the requirements repo.

The requirements repo has had a setup.cfg etc for a long time but only
recently started using it. As it now has dependencies, we need to pip
install it. To preserve compat with older requirements repos I haven't
changed the call to invoke update-requirements yet, as we still have
the update.py symlink.

The pbr install is moved before requirements to ensure we don't
trigger easy-install.

Change-Id: I7d7e91694c9145fac0ddab8a9de5f789d723c641
This commit is contained in:
Robert Collins 2015-06-17 13:52:20 +12:00
parent 76abc02d5b
commit 9f871cd5de
2 changed files with 12 additions and 3 deletions

View File

@ -219,15 +219,15 @@ function setup_package_with_req_sync {
if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then
if is_in_projects_txt $project_dir; then
(cd $REQUIREMENTS_DIR; \
python update.py $project_dir)
./.venv/bin/python update.py $project_dir)
else
# soft update projects not found in requirements project.txt
(cd $REQUIREMENTS_DIR; \
python update.py -s $project_dir)
./.venv/bin/python update.py -s $project_dir)
fi
else
(cd $REQUIREMENTS_DIR; \
python update.py $project_dir)
./.venv/bin/python update.py $project_dir)
fi
fi

View File

@ -29,8 +29,17 @@ REQUIREMENTS_DIR=$DEST/requirements
# install_infra() - Collect source and prepare
function install_infra {
local PIP_VIRTUAL_ENV="$REQUIREMENTS_DIR/.venv"
# bring down global requirements
git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH
[ ! -d $PIP_VIRTUAL_ENV ] && virtualenv $PIP_VIRTUAL_ENV
# We don't care about testing git pbr in the requirements venv.
PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install -U pbr
PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install $REQUIREMENTS_DIR
# Unset the PIP_VIRTUAL_ENV so that PBR does not end up trapped
# down the VENV well
unset PIP_VIRTUAL_ENV
# Install pbr
if use_library_from_git "pbr"; then