From 2e1638a1b02ceee436cb717131fa5f3bfb925a88 Mon Sep 17 00:00:00 2001 From: jxltom <jxltom@users.noreply.github.com> Date: Fri, 2 Mar 2018 22:04:00 +0800 Subject: [PATCH] Fix PYTHONPATH is not set when running collectstatic (#637) * Fix PYTHONPATH is not set when running collectstatic * update changelog Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ bin/steps/collectstatic | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f36c0a92..65cd7ddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Python Buildpack Changelog +# 125 + +Set `PYTHONPATH` during collectstatic runs. + # 124 Update buildpack to automatically install [dev-packages] (Pipenv) during Heroku CI builds. diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic index 647ab92d..989490be 100755 --- a/bin/steps/collectstatic +++ b/bin/steps/collectstatic @@ -30,6 +30,7 @@ if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALL puts-step "$ python $MANAGE_FILE collectstatic --noinput" # Run collectstatic, cleanup some of the noisy output. + export PYTHONPATH=. python "$MANAGE_FILE" collectstatic --noinput --traceback 2>&1 | sed '/^Post-processed/d;/^Copying/d;/^$/d' | indent COLLECTSTATIC_STATUS="${PIPESTATUS[0]}" -- GitLab