lib/infra
e263c82e
 #!/bin/bash
 #
0392a10a
 # lib/infra
 #
 # Functions to install infrastructure projects needed by other projects
 # early in the cycle. We need this so we can do things like gate on
 # requirements as a global list
 
 # Dependencies:
6a5aa7c6
 #
 # - ``functions`` file
0392a10a
 
 # ``stack.sh`` calls the entry points in this order:
 #
6a5aa7c6
 # - install_infra
0392a10a
 
 # Save trace setting
523f4880
 _XTRACE_INFRA=$(set +o | grep xtrace)
0392a10a
 set +o xtrace
 
 
 # Defaults
 # --------
cc52406a
 GITDIR["pbr"]=$DEST/pbr
0392a10a
 
 # Entry Points
 # ------------
 
 # install_infra() - Collect source and prepare
aee18c74
 function install_infra {
40f3e33f
     local PIP_VIRTUAL_ENV="$REQUIREMENTS_DIR/.venv"
4143ce6f
     [ ! -d $PIP_VIRTUAL_ENV ] && ${VIRTUALENV_CMD} $PIP_VIRTUAL_ENV
86923559
     # 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
40f3e33f
 
7ebe8e07
     # Unset the PIP_VIRTUAL_ENV so that PBR does not end up trapped
     # down the VENV well
     unset PIP_VIRTUAL_ENV
 
0392a10a
     # Install pbr
cc52406a
     if use_library_from_git "pbr"; then
         git_clone_by_name "pbr"
2105b9f9
         setup_dev_lib "pbr"
cc52406a
     else
013f52b0
         # Always upgrade pbr to latest version as we may have pulled it
         # in via system packages.
         pip_install "-U" "pbr"
cc52406a
     fi
0392a10a
 }
 
 # Restore xtrace
523f4880
 $_XTRACE_INFRA
0392a10a
 
6a5aa7c6
 # Tell emacs to use shell-script-mode
 ## Local variables:
 ## mode: shell-script
 ## End: