mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Grep bug fix (#456)
* fixed the bug for pypy-5.8.0 * changelog entry Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * use std-lib sub-env Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * let's see if this cleans things up Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * try v7 of stdlib Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * use new sub_env Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * set_env Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * set_default_env Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * v8 of stdlib Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * v112 Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * oops (merge bug) Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * final merge error resolve Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * final final fix for merge conflict Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
@@ -4,7 +4,7 @@ shopt -s nullglob
|
||||
|
||||
# The standard library.
|
||||
if [[ ! -f /tmp/stdlib.sh ]]; then
|
||||
curl --retry 3 -s https://lang-common.s3.amazonaws.com/buildpack-stdlib/v2/stdlib.sh > /tmp/stdlib.sh
|
||||
curl --retry 3 -s https://lang-common.s3.amazonaws.com/buildpack-stdlib/v8/stdlib.sh > /tmp/stdlib.sh
|
||||
fi
|
||||
# shellcheck source=/dev/null
|
||||
source /tmp/stdlib.sh
|
||||
@@ -53,30 +53,6 @@ deep-cp() {
|
||||
}
|
||||
|
||||
|
||||
sub-env() {
|
||||
|
||||
WHITELIST=${2:-''}
|
||||
BLACKLIST=${3:-'^(GIT_DIR|STACK|PYTHONHOME|LD_LIBRARY_PATH|LIBRARY_PATH|PATH)$'}
|
||||
|
||||
# Python-specific variables.
|
||||
export PYHONHOME=$BUILD_DIR/.heroku/python
|
||||
export PYTHONPATH=$BUILD_DIR/
|
||||
|
||||
(
|
||||
if [ -d "$ENV_DIR" ]; then
|
||||
# shellcheck disable=SC2045
|
||||
for e in $(ls "$ENV_DIR"); do
|
||||
echo "$e" | grep -E "$WHITELIST" | grep -qvE "$BLACKLIST" &&
|
||||
export "$e=$(cat "$ENV_DIR/$e")"
|
||||
:
|
||||
done
|
||||
fi
|
||||
|
||||
"$@"
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
# Measure the size of the Python installation.
|
||||
measure-size() {
|
||||
echo "$(du -s .heroku/python 2>/dev/null || echo 0) | awk '{print $1}')"
|
||||
|
||||
Reference in New Issue
Block a user