Add global venv enable/disable knob

Adds USE_VENV to globally enable/disable use of virtual environments.
ADDITIONAL_VENV_PACKAGES is used to manually add packages that do not
appear in requirements.txt or test-requirements.txt to be installed
into each venv. Database Python bindings are handled this way when
a dataabse service is enabled.
Change-Id: I9cf298b936fd10c95e2ce5f51aab0d49d4b7f37f
This commit is contained in:
Dean Troyer
2015年03月09日 14:27:51 -05:00
parent 05163d66ac
commit 5686dbc45d

View File

@@ -16,13 +16,17 @@
function stack_install_service {
local service=1ドル
if type install_${service} >/dev/null 2>&1; then
if [[ -n ${PROJECT_VENV[$service]:-} ]]; then
if [[ ${USE_VENV} = True && -n ${PROJECT_VENV[$service]:-} ]]; then
rm -rf ${PROJECT_VENV[$service]}
source $TOP_DIR/tools/build_venv.sh ${PROJECT_VENV[$service]}
source $TOP_DIR/tools/build_venv.sh ${PROJECT_VENV[$service]} ${ADDITIONAL_VENV_PACKAGES//,/ }
export PIP_VIRTUAL_ENV=${PROJECT_VENV[$service]:-}
# Install other OpenStack prereqs that might come from source repos
install_oslo
install_keystonemiddleware
fi
install_${service}
if [[ -n ${PROJECT_VENV[$service]:-} ]]; then
if [[ ${USE_VENV} = True && -n ${PROJECT_VENV[$service]:-} ]]; then
unset PIP_VIRTUAL_ENV
fi
fi
Reference in New Issue
openstack/devstack
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.