Merge "Put requirements repo in a venv."
This commit is contained in:
commit
e3f683829d
@ -219,15 +219,15 @@ function setup_package_with_req_sync {
|
|||||||
if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then
|
if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then
|
||||||
if is_in_projects_txt $project_dir; then
|
if is_in_projects_txt $project_dir; then
|
||||||
(cd $REQUIREMENTS_DIR; \
|
(cd $REQUIREMENTS_DIR; \
|
||||||
python update.py $project_dir)
|
./.venv/bin/python update.py $project_dir)
|
||||||
else
|
else
|
||||||
# soft update projects not found in requirements project.txt
|
# soft update projects not found in requirements project.txt
|
||||||
(cd $REQUIREMENTS_DIR; \
|
(cd $REQUIREMENTS_DIR; \
|
||||||
python update.py -s $project_dir)
|
./.venv/bin/python update.py -s $project_dir)
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
(cd $REQUIREMENTS_DIR; \
|
(cd $REQUIREMENTS_DIR; \
|
||||||
python update.py $project_dir)
|
./.venv/bin/python update.py $project_dir)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ REQUIREMENTS_DIR=$DEST/requirements
|
|||||||
|
|
||||||
# install_infra() - Collect source and prepare
|
# install_infra() - Collect source and prepare
|
||||||
function install_infra {
|
function install_infra {
|
||||||
|
local PIP_VIRTUAL_ENV="$REQUIREMENTS_DIR/.venv"
|
||||||
|
|
||||||
# Install pbr
|
# Install pbr
|
||||||
if use_library_from_git "pbr"; then
|
if use_library_from_git "pbr"; then
|
||||||
git_clone_by_name "pbr"
|
git_clone_by_name "pbr"
|
||||||
@ -41,7 +43,9 @@ function install_infra {
|
|||||||
|
|
||||||
# bring down global requirements
|
# bring down global requirements
|
||||||
git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH
|
git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH
|
||||||
pip_install $REQUIREMENTS_DIR
|
[ ! -d $PIP_VIRTUAL_ENV ] && virtualenv $PIP_VIRTUAL_ENV
|
||||||
|
PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install -U pbr
|
||||||
|
PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install $REQUIREMENTS_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
|
Loading…
Reference in New Issue
Block a user