mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
add loging to pip-install
This commit is contained in:
@@ -29,6 +29,9 @@ PYTHON_EXE="/app/.heroku/python/bin/python"
|
||||
PIP_VERSION="7.1.2"
|
||||
SETUPTOOLS_VERSION="18.3.2"
|
||||
|
||||
# Common Problem Warnings
|
||||
export WARNINGS_LOG=$(mktemp)
|
||||
|
||||
# Setup bpwatch
|
||||
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
||||
LOGPLEX_KEY="t.b90d9d29-5388-4908-9737-b4576af1d4ce"
|
||||
|
||||
@@ -4,7 +4,7 @@ puts-step "Installing dependencies with pip"
|
||||
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
||||
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
||||
|
||||
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src --allow-all-external --disable-pip-version-check --no-cache-dir | cleanup | indent
|
||||
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src --allow-all-external --disable-pip-version-check --no-cache-dir | cleanup | log-output | indent
|
||||
|
||||
# Smart Requirements handling
|
||||
cp requirements.txt .heroku/python/requirements-declared.txt
|
||||
|
||||
@@ -11,6 +11,16 @@ indent() {
|
||||
sed "s/^/ /"
|
||||
}
|
||||
|
||||
# Log output for warning detection
|
||||
log-output() (
|
||||
while read LINE;
|
||||
do
|
||||
echo "$LINE"
|
||||
echo "$LINE" >> "$WARNINGS_LOG"
|
||||
done
|
||||
|
||||
)
|
||||
|
||||
# Clean up pip output
|
||||
cleanup() {
|
||||
sed -e 's/\.\.\.\+/.../g' | sed -e '/already satisfied/Id' | sed -e '/Overwriting/Id' | sed -e '/python executable/Id' | sed -e '/no previously-included files/Id'
|
||||
|
||||
Reference in New Issue
Block a user