From 7d975e74a93077f301916c85bce1089d59cb11f6 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.org> Date: Tue, 13 Mar 2018 20:59:11 -0400 Subject: [PATCH] default to user python path for collectstatic runs (#655) * default to user python path for collectstatic runs Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * bugfixes Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * fix Signed-off-by: Kenneth Reitz <me@kennethreitz.org> --- CHANGELOG.md | 4 ++++ bin/steps/collectstatic | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88fee246..a6b98fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Python Buildpack Changelog +# 126 + +Bugfixes. + # 125 Bugfixes. diff --git a/bin/steps/collectstatic b/bin/steps/collectstatic index fbd9b880..b779b7e4 100755 --- a/bin/steps/collectstatic +++ b/bin/steps/collectstatic @@ -30,7 +30,8 @@ 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=. + PYTHONPATH=${PYTHONPATH:-.} + export PYTHONPATH python "$MANAGE_FILE" collectstatic --noinput --traceback 2>&1 | sed '/^Post-processed/d;/^Copying/d;/^$/d' | indent COLLECTSTATIC_STATUS="${PIPESTATUS[0]}" -- GitLab