Browse code

Fix TRACKING_DEPENDS mode

TRACKING_DEPENDS mode was added in I89677fd54635e82b10ab674ddeb9ffb3f1a755f0

TRACKING_DEPENDS creates a global virtualenv and assumes it exists for
all pip_installs (except for installing virtualenv), so we need to set
this up before any other pip install

Change-Id: Iebe6295913094b32124295e7c5e674e1cebaaa87

Joe Gordon authored on 2014/12/16 14:11:20
Showing 1 changed files
... ...
@@ -704,6 +704,19 @@ if [[ "$OFFLINE" != "True" ]]; then
704 704
     PYPI_ALTERNATIVE_URL=$PYPI_ALTERNATIVE_URL $TOP_DIR/tools/install_pip.sh
705 705
 fi
706 706
 
707
+TRACK_DEPENDS=${TRACK_DEPENDS:-False}
708
+
709
+# Install python packages into a virtualenv so that we can track them
710
+if [[ $TRACK_DEPENDS = True ]]; then
711
+    echo_summary "Installing Python packages into a virtualenv $DEST/.venv"
712
+    pip_install -U virtualenv
713
+
714
+    rm -rf $DEST/.venv
715
+    virtualenv --system-site-packages $DEST/.venv
716
+    source $DEST/.venv/bin/activate
717
+    $DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
718
+fi
719
+
707 720
 # Do the ugly hacks for broken packages and distros
708 721
 source $TOP_DIR/tools/fixup_stuff.sh
709 722
 
... ...
@@ -729,19 +742,6 @@ if is_service_enabled neutron; then
729 729
     install_neutron_agent_packages
730 730
 fi
731 731
 
732
-TRACK_DEPENDS=${TRACK_DEPENDS:-False}
733
-
734
-# Install python packages into a virtualenv so that we can track them
735
-if [[ $TRACK_DEPENDS = True ]]; then
736
-    echo_summary "Installing Python packages into a virtualenv $DEST/.venv"
737
-    pip_install -U virtualenv
738
-
739
-    rm -rf $DEST/.venv
740
-    virtualenv --system-site-packages $DEST/.venv
741
-    source $DEST/.venv/bin/activate
742
-    $DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
743
-fi
744
-
745 732
 # Check Out and Install Source
746 733
 # ----------------------------
747 734