From 3a42f565cb386ff0b70724dcc2b92e6eb47c58a7 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.com>
Date: Thu, 17 Jul 2014 16:39:29 -0400
Subject: [PATCH] change the order of things

---
 bin/compile | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/bin/compile b/bin/compile
index 27bbcb67..57234d37 100755
--- a/bin/compile
+++ b/bin/compile
@@ -148,16 +148,6 @@ mkdir -p $(dirname $PROFILE_PATH)
 set +e
 PYTHON_VERSION=$(cat runtime.txt)
 
-rm -fr .heroku/python
-if [ ! $STACK = $CACHED_PYTHON_STACK ]; then
-  bpwatch start uninstall_python
-    puts-step "Stack changed, re-installing $PYTHON_VERSION."
-    rm -fr .heroku/python
-  bpwatch stop uninstall_python
-else
-  SKIP_INSTALL=1
-fi
-
 # Install Python.
 if [ -f .heroku/python-version ]; then
   if [ ! $(cat .heroku/python-version) = $PYTHON_VERSION ]; then
@@ -170,6 +160,13 @@ if [ -f .heroku/python-version ]; then
   fi
 fi
 
+if [ ! $STACK = $CACHED_PYTHON_STACK ]; then
+  bpwatch start uninstall_python
+    puts-step "Stack changed, re-installing $PYTHON_VERSION."
+    rm -fr .heroku/python
+  bpwatch stop uninstall_python
+fi
+
 
 if [ ! "$SKIP_INSTALL" ]; then
   bpwatch start install_python
-- 
GitLab