mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
d35ee2c14c
commit554a8bbae6Author: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 16:26:18 2016 -0500 comment out debugging line commit6572ad3d44Author: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 16:21:03 2016 -0500 test commit35cabaeebcAuthor: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 16:09:21 2016 -0500 try . commit300285a92dAuthor: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 16:05:22 2016 -0500 find commit7a6f1eb010Author: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 16:02:24 2016 -0500 find commit66d754978eAuthor: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 15:55:04 2016 -0500 fix xargs commit9c222a9350Author: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 15:53:04 2016 -0500 copy src commit7f4273f47fAuthor: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 15:45:20 2016 -0500 new replace script commitdd707c21e3Author: Kenneth Reitz <me@kennethreitz.org> Date: Mon Dec 19 15:40:35 2016 -0500 re-write egg-links
32 lines
1.2 KiB
Plaintext
Executable File
32 lines
1.2 KiB
Plaintext
Executable File
# Install dependencies with Pip.
|
|
puts-cmd "pip install -r requirements.txt"
|
|
|
|
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
|
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
|
|
|
set +e
|
|
/app/.heroku/python/bin/pip install -r $BUILD_DIR/requirements.txt --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent
|
|
PIP_STATUS="${PIPESTATUS[0]}"
|
|
set -e
|
|
|
|
show-warnings
|
|
|
|
if [[ ! $PIP_STATUS -eq 0 ]]; then
|
|
exit 1
|
|
fi
|
|
|
|
|
|
# Smart Requirements handling
|
|
cp requirements.txt .heroku/python/requirements-declared.txt
|
|
/app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt
|
|
|
|
# Replace egg-links with new paths for /app.
|
|
# find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -0 cat
|
|
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -0 -n 1 sed -i -e "s#$(pwd)/#./app/#"
|
|
find .heroku/python/lib/python*/site-packages/ -name "easy-install.pth" -print0 | xargs -0 -n 1 sed -i -e "s#$(pwd)/#/app/#"
|
|
|
|
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
|
|
[ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first
|
|
|
|
echo
|