mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b4ec35433a | |||
| cf1148f0a8 | |||
| a0649b1e50 | |||
| 2f2fd24421 | |||
| f754ae16bb | |||
| cef1be80a5 | |||
| c0571d86bf | |||
| d82eddca03 | |||
| 119e8145c3 |
@@ -1,5 +1,21 @@
|
|||||||
# Python Buildpack Changelog
|
# Python Buildpack Changelog
|
||||||
|
|
||||||
|
## 96
|
||||||
|
|
||||||
|
Bugfix.
|
||||||
|
|
||||||
|
## 95
|
||||||
|
|
||||||
|
Improved output support.
|
||||||
|
|
||||||
|
## v94
|
||||||
|
|
||||||
|
Improved support for PyPy.
|
||||||
|
|
||||||
|
## v93
|
||||||
|
|
||||||
|
Improved support for PyPy.
|
||||||
|
|
||||||
## v92
|
## v92
|
||||||
|
|
||||||
Improved cache functionality and fix egg-links regression.
|
Improved cache functionality and fix egg-links regression.
|
||||||
|
|||||||
+17
-4
@@ -193,6 +193,10 @@ source $BIN_DIR/steps/gdal
|
|||||||
# Install dependencies with Pip (where the magic happens).
|
# Install dependencies with Pip (where the magic happens).
|
||||||
source $BIN_DIR/steps/pip-install
|
source $BIN_DIR/steps/pip-install
|
||||||
|
|
||||||
|
# Support for pip install -e.
|
||||||
|
rm -fr $BUILD_DIR/.heroku/src
|
||||||
|
deep-cp /app/.heroku/src $BUILD_DIR/.heroku/src
|
||||||
|
|
||||||
# Django collectstatic support.
|
# Django collectstatic support.
|
||||||
sub-env $BIN_DIR/steps/collectstatic
|
sub-env $BIN_DIR/steps/collectstatic
|
||||||
|
|
||||||
@@ -209,15 +213,24 @@ set-default-env PYTHONPATH /app/
|
|||||||
# Install sane-default script for $WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS.
|
# Install sane-default script for $WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS.
|
||||||
cp $ROOT_DIR/vendor/python.gunicorn.sh $GUNICORN_PROFILE_PATH
|
cp $ROOT_DIR/vendor/python.gunicorn.sh $GUNICORN_PROFILE_PATH
|
||||||
|
|
||||||
# Support for pip install -e.
|
|
||||||
rm -fr $BUILD_DIR/.heroku/src
|
|
||||||
deep-cp /app/.heroku/src $BUILD_DIR/.heroku/src
|
|
||||||
|
|
||||||
# Experimental post_compile hook.
|
# Experimental post_compile hook.
|
||||||
bpwatch start post_compile
|
bpwatch start post_compile
|
||||||
source $BIN_DIR/steps/hooks/post_compile
|
source $BIN_DIR/steps/hooks/post_compile
|
||||||
bpwatch stop post_compile
|
bpwatch stop post_compile
|
||||||
|
|
||||||
|
|
||||||
|
set +e
|
||||||
|
# rewrite build dir in egg links to /app so things are found at runtime
|
||||||
|
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#" &> /dev/null
|
||||||
|
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#" &> /dev/null
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set +e
|
||||||
|
# Support for PyPy
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#" &> /dev/null
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#" &> /dev/null
|
||||||
|
set -e
|
||||||
|
|
||||||
# Store new artifacts in cache.
|
# Store new artifacts in cache.
|
||||||
bpwatch start dump_cache
|
bpwatch start dump_cache
|
||||||
|
|
||||||
|
|||||||
+10
-7
@@ -1,9 +1,17 @@
|
|||||||
# Install dependencies with Pip.
|
# Install dependencies with Pip.
|
||||||
puts-cmd "pip install -r requirements.txt"
|
puts-cmd "pip install -r requirements.txt"
|
||||||
|
|
||||||
|
set +e
|
||||||
# rewrite any existing egg links to point to the build dir so pip does not fail with a mismatch error
|
# rewrite any existing egg links to point to the build dir so pip does not fail with a mismatch error
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#"
|
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#" &> /dev/null
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#"
|
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set +e
|
||||||
|
# Support for PyPy
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#" &> /dev/null
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
|
||||||
|
set -e
|
||||||
|
|
||||||
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
||||||
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
||||||
@@ -27,9 +35,4 @@ cp requirements.txt .heroku/python/requirements-declared.txt
|
|||||||
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
|
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
|
||||||
[ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first
|
[ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first
|
||||||
|
|
||||||
# rewrite build dir in egg links to /app so things are found at runtime
|
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#"
|
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#"
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user