diff --git a/bin/compile b/bin/compile
index 57234d37a7aa36d02eaca3fcf457427c7b585c6d..0afdab9e20f22695e05a92c3a6e57f1a4f2c19e7 100755
--- a/bin/compile
+++ b/bin/compile
@@ -186,6 +186,7 @@ if [ ! "$SKIP_INSTALL" ]; then
 
   # Record for future reference.
   echo $PYTHON_VERSION > .heroku/python-version
+  echo $STACK > .heroku/python-stack
   FRESH_PYTHON=true
 
   hash -r