From 9c222a9350b622ac0f03341eef2b8701b3a847b5 Mon Sep 17 00:00:00 2001
From: Kenneth Reitz <me@kennethreitz.org>
Date: Mon, 19 Dec 2016 15:53:04 -0500
Subject: [PATCH] copy src

---
 bin/compile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bin/compile b/bin/compile
index b1061071..0ef5bc66 100755
--- a/bin/compile
+++ b/bin/compile
@@ -146,13 +146,16 @@ bpwatch stop restore_cache
 
 mkdir -p $(dirname $PROFILE_PATH)
 
+# Make the directory for -e pip installations.
+mkdir -p /app/.heroku/src
+
 if [[ $BUILD_DIR != '/app' ]]; then
   # python expects to reside in /app, so set up symlinks
   # we will not remove these later so subsequent buildpacks can still invoke it
   ln -s $BUILD_DIR/.heroku/python /app/.heroku/python
   ln -s $BUILD_DIR/.heroku/vendor /app/.heroku/vendor
   ln -s $BUILD_DIR/.heroku/venv /app/.heroku/venv
-  ln -s $BUILD_DIR/.heroku/src /app/.heroku/src
+  # NOTE: /app/.heroku/src also exists, but is copied manually later.
 fi
 
 # Install Python.
@@ -199,6 +202,9 @@ set-default-env PYTHONPATH /app/
 # Install sane-default script for $WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS.
 cp $ROOT_DIR/vendor/python.gunicorn.sh $GUNICORN_PROFILE_PATH
 
+# Deep copy the directory for -e pip installations
+deep-cp /app/.heroku/src $BUILD_DIR/.heroku/src
+
 # Experimental post_compile hook.
 bpwatch start post_compile
   source $BIN_DIR/steps/hooks/post_compile
-- 
GitLab