| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 1 | # lib/infra | 
|  | 2 | # | 
|  | 3 | # Functions to install infrastructure projects needed by other projects | 
|  | 4 | # early in the cycle. We need this so we can do things like gate on | 
|  | 5 | # requirements as a global list | 
|  | 6 |  | 
|  | 7 | # Dependencies: | 
|  | 8 | # ``functions`` file | 
|  | 9 |  | 
|  | 10 | # ``stack.sh`` calls the entry points in this order: | 
|  | 11 | # | 
|  | 12 | # unfubar_setuptools | 
|  | 13 | # install_infra | 
|  | 14 |  | 
|  | 15 | # Save trace setting | 
|  | 16 | XTRACE=$(set +o | grep xtrace) | 
|  | 17 | set +o xtrace | 
|  | 18 |  | 
|  | 19 |  | 
|  | 20 | # Defaults | 
|  | 21 | # -------- | 
|  | 22 | PBR_DIR=$DEST/pbr | 
|  | 23 | REQUIREMENTS_DIR=$DEST/requirements | 
|  | 24 |  | 
|  | 25 | # Entry Points | 
|  | 26 | # ------------ | 
|  | 27 |  | 
|  | 28 | # unfubar_setuptools() - Unbreak the giant mess that is the current state of setuptools | 
|  | 29 | function unfubar_setuptools() { | 
|  | 30 | # this is a giant game of who's on first, but it does consistently work | 
|  | 31 | # there is hope that upstream python packaging fixes this in the future | 
|  | 32 | echo_summary "Unbreaking setuptools" | 
|  | 33 | pip_install -U setuptools | 
|  | 34 | pip_install -U pip | 
|  | 35 | uninstall_package python-setuptools | 
|  | 36 | pip_install -U setuptools | 
|  | 37 | pip_install -U pip | 
|  | 38 | } | 
|  | 39 |  | 
|  | 40 |  | 
|  | 41 | # install_infra() - Collect source and prepare | 
|  | 42 | function install_infra() { | 
|  | 43 | # bring down global requirements | 
|  | 44 | git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH | 
|  | 45 |  | 
|  | 46 | # Install pbr | 
|  | 47 | git_clone $PBR_REPO $PBR_DIR $PBR_BRANCH | 
|  | 48 | setup_develop $PBR_DIR | 
|  | 49 | } | 
|  | 50 |  | 
|  | 51 | # Restore xtrace | 
|  | 52 | $XTRACE | 
|  | 53 |  | 
|  | 54 | # Local variables: | 
|  | 55 | # mode: shell-script | 
|  | 56 | # End: |