mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f1017f2fc | |||
| 2331a3131c | |||
| 372e79ab92 | |||
| d3f455ca3b | |||
| 8d11fddfd3 | |||
| d7519075c6 | |||
| fb839075d1 | |||
| e5fcc9efd0 | |||
| efb2f78a04 | |||
| ffe0c305ee | |||
| 95cc7a4951 | |||
| ebe3ff2e2f | |||
| f9b74e8bfe | |||
| a1e31696f6 | |||
| 4e207e4bb8 | |||
| e36d1a9406 | |||
| 128a6dd0dc | |||
| bf0aa7df8d | |||
| 41da9d6df8 | |||
| a3675f9c2a | |||
| 3b3cb9e6c0 | |||
| 7d3ecc7bb4 | |||
| cb8ad83a06 | |||
| 6fe93c9b9e | |||
| 83e64a15dd | |||
| 9634be2a40 | |||
| f7488df407 | |||
| 40a0640349 | |||
| 0fec3dcc00 | |||
| c05204d6b5 | |||
| 4db407f361 | |||
| 23929c97d0 | |||
| a095dceb93 | |||
| 7a9a9787d4 | |||
| 18c22492af | |||
| 57e0a88585 | |||
| 29aeefeba1 | |||
| 2b7671369d | |||
| a5b84e5ffb | |||
| aeb4d075aa | |||
| 6010d1f3ed | |||
| fc4f686f1e | |||
| f86ceaddfb | |||
| c708a0af7d | |||
| a6ccde2bfd | |||
| 29775c020a | |||
| d380d949b7 | |||
| d6ccb1aa57 |
@@ -1,13 +1,5 @@
|
||||
# Python Buildpack Changelog
|
||||
|
||||
# 121
|
||||
|
||||
Update default Python to v3.6.3.
|
||||
|
||||
# 120
|
||||
|
||||
Use Pipenv --deploy.
|
||||
|
||||
# 119
|
||||
|
||||
Improvements to Pipenv support, warning on unsupported Python versions.
|
||||
|
||||
Generated
+2
-2
@@ -5,14 +5,14 @@
|
||||
},
|
||||
"host-environment-markers": {
|
||||
"implementation_name": "cpython",
|
||||
"implementation_version": "3.6.3",
|
||||
"implementation_version": "3.6.2",
|
||||
"os_name": "posix",
|
||||
"platform_machine": "x86_64",
|
||||
"platform_python_implementation": "CPython",
|
||||
"platform_release": "16.7.0",
|
||||
"platform_system": "Darwin",
|
||||
"platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64",
|
||||
"python_full_version": "3.6.3",
|
||||
"python_full_version": "3.6.2",
|
||||
"python_version": "3.6",
|
||||
"sys_platform": "darwin"
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ Deploying a Python application couldn't be easier:
|
||||
$ git push heroku master
|
||||
…
|
||||
-----> Python app detected
|
||||
-----> Installing python-3.6.3
|
||||
-----> Installing python-3.6.2
|
||||
-----> Installing pip
|
||||
-----> Installing requirements with latest pipenv…
|
||||
...
|
||||
@@ -58,7 +58,7 @@ Or, more specifically:
|
||||
|
||||
Runtime options include:
|
||||
|
||||
- `python-3.6.3`
|
||||
- `python-3.6.2`
|
||||
- `python-2.7.14`
|
||||
- `pypy-5.7.1` (unsupported, experimental)
|
||||
- `pypy3-5.5.1` (unsupported, experimental)
|
||||
|
||||
+2
-2
@@ -34,8 +34,8 @@ ENV_DIR=$3
|
||||
export BUILD_DIR CACHE_DIR ENV_DIR
|
||||
|
||||
# Python defaults
|
||||
DEFAULT_PYTHON_VERSION="python-3.6.4"
|
||||
LATEST_3="python-3.6.4"
|
||||
DEFAULT_PYTHON_VERSION="python-3.6.2"
|
||||
LATEST_3="python-3.6.2"
|
||||
LATEST_2="python-2.7.14"
|
||||
|
||||
DEFAULT_PYTHON_STACK="cedar-14"
|
||||
|
||||
+1
-6
@@ -40,10 +40,5 @@ if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then
|
||||
|
||||
GDAL=$(pwd)/vendor
|
||||
export GDAL
|
||||
# set path for post_compile hooks
|
||||
export GDAL_LIBRARY_PATH="$BUILD_DIR/.heroku/vendor/lib/libgdal.so"
|
||||
export GEOS_LIBRARY_PATH="$BUILD_DIR/.heroku/vendor/lib/libgeos_c.so"
|
||||
# set path for runtime environmeht
|
||||
set_env GDAL_LIBRARY_PATH "/app/.heroku/vendor/lib/libgdal.so"
|
||||
set_env GEOS_LIBRARY_PATH "/app/.heroku/vendor/lib/libgeos_c.so"
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# shellcheck source=bin/utils
|
||||
source $BIN_DIR/utils
|
||||
|
||||
if [ ! "$SKIP_PIP_INSTALL" ]; then
|
||||
|
||||
# Install dependencies with Pip.
|
||||
puts-step "Installing requirements with pip"
|
||||
|
||||
set +e
|
||||
|
||||
# Measure that we're using pip.
|
||||
mcount "tool.pip"
|
||||
|
||||
/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]}"
|
||||
|
||||
+1
-6
@@ -2,24 +2,19 @@
|
||||
|
||||
# export CLINT_FORCE_COLOR=1
|
||||
# export PIPENV_FORCE_COLOR=1
|
||||
# shellcheck source=bin/utils
|
||||
source $BIN_DIR/utils
|
||||
|
||||
# Pipenv support (Generate requriements.txt with pipenv).
|
||||
if [[ -f Pipfile ]]; then
|
||||
if [[ ! -f requirements.txt ]]; then
|
||||
puts-step "Installing requirements with latest Pipenv…"
|
||||
|
||||
# Measure that we're using Pipenv.
|
||||
mcount "tool.pipenv"
|
||||
|
||||
# Install pipenv.
|
||||
/app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
|
||||
|
||||
if [[ ! -f Pipfile.lock ]]; then
|
||||
/app/.heroku/python/bin/pipenv install --system --skip-lock 2>&1 | indent
|
||||
else
|
||||
/app/.heroku/python/bin/pipenv install --system --deploy 2>&1 | indent
|
||||
/app/.heroku/python/bin/pipenv install --system 2>&1 | indent
|
||||
fi
|
||||
# Install the dependencies.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
|
||||
echo "python-2.7.14" > "$BUILD_DIR/runtime.txt"
|
||||
fi
|
||||
if [ "$PYTHON" = 3.6 ]; then
|
||||
echo "python-3.6.3" > "$BUILD_DIR/runtime.txt"
|
||||
echo "python-3.6.2" > "$BUILD_DIR/runtime.txt"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
# Build Deps: libraries/sqlite
|
||||
|
||||
OUT_PREFIX=$1
|
||||
|
||||
echo "Building Python…"
|
||||
SOURCE_TARBALL='https://python.org/ftp/python/3.6.3/Python-3.6.3.tgz'
|
||||
curl -L $SOURCE_TARBALL | tar xz
|
||||
mv Python-3.6.3 src
|
||||
cd src
|
||||
|
||||
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
|
||||
make
|
||||
make install
|
||||
|
||||
# Remove unneeded test directories, similar to the official Docker Python images:
|
||||
# https://github.com/docker-library/python
|
||||
find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' +
|
||||
|
||||
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||
@@ -1,21 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
# Build Deps: libraries/sqlite
|
||||
|
||||
OUT_PREFIX=$1
|
||||
|
||||
echo "Building Python…"
|
||||
SOURCE_TARBALL='https://python.org/ftp/python/3.6.4/Python-3.6.4.tgz'
|
||||
curl -L $SOURCE_TARBALL | tar xz
|
||||
mv Python-3.6.4 src
|
||||
cd src
|
||||
|
||||
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
|
||||
make
|
||||
make install
|
||||
|
||||
# Remove unneeded test directories, similar to the official Docker Python images:
|
||||
# https://github.com/docker-library/python
|
||||
find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' +
|
||||
|
||||
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||
+1
-1
@@ -6,4 +6,4 @@ verify_ssl = true
|
||||
requests = "*"
|
||||
|
||||
[requires]
|
||||
python_full_version = "3.6.3"
|
||||
python_full_version = "3.6.2"
|
||||
+14
-59
@@ -1,68 +1,23 @@
|
||||
{
|
||||
"default": {
|
||||
"requests": {
|
||||
"version": "==2.13.0",
|
||||
"hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb"
|
||||
}
|
||||
},
|
||||
"develop": {},
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "22a052f4d1cfe6518b2f236fe45c3208c587a9ab1323bdd390632e27278b541e"
|
||||
},
|
||||
"host-environment-markers": {
|
||||
"implementation_name": "cpython",
|
||||
"implementation_version": "3.6.3",
|
||||
"os_name": "posix",
|
||||
"platform_machine": "x86_64",
|
||||
"platform_python_implementation": "CPython",
|
||||
"platform_release": "16.7.0",
|
||||
"platform_system": "Darwin",
|
||||
"platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64",
|
||||
"python_full_version": "3.6.3",
|
||||
"python_version": "3.6",
|
||||
"sys_platform": "darwin"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
"python_full_version": "3.6.3"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://pypi.python.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"certifi": {
|
||||
"hashes": [
|
||||
"sha256:244be0d93b71e93fc0a0a479862051414d0e00e16435707e5bf5000f92e04694",
|
||||
"sha256:5ec74291ca1136b40f0379e1128ff80e866597e4e2c1e755739a913bbc3613c0"
|
||||
],
|
||||
"version": "==2017.11.5"
|
||||
],
|
||||
"requires": {
|
||||
"python_version": "3.6"
|
||||
},
|
||||
"chardet": {
|
||||
"hashes": [
|
||||
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691",
|
||||
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
|
||||
],
|
||||
"version": "==3.0.4"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:8c7309c718f94b3a625cb648ace320157ad16ff131ae0af362c9f21b80ef6ec4",
|
||||
"sha256:2c6a5de3089009e3da7c5dde64a141dbc8551d5b7f6cf4ed7c2568d0cc520a8f"
|
||||
],
|
||||
"version": "==2.6"
|
||||
},
|
||||
"requests": {
|
||||
"hashes": [
|
||||
"sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b",
|
||||
"sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e"
|
||||
],
|
||||
"version": "==2.18.4"
|
||||
},
|
||||
"urllib3": {
|
||||
"hashes": [
|
||||
"sha256:06330f386d6e4b195fbfc736b297f58c5a892e4440e54d294d7004e3a9bbea1b",
|
||||
"sha256:cc44da8e1145637334317feebd728bd869a35285b93cbb4cca2577da7e62db4f"
|
||||
],
|
||||
"version": "==1.22"
|
||||
"hash": {
|
||||
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,14 +5,14 @@
|
||||
},
|
||||
"host-environment-markers": {
|
||||
"implementation_name": "cpython",
|
||||
"implementation_version": "3.6.3",
|
||||
"implementation_version": "3.6.2",
|
||||
"os_name": "posix",
|
||||
"platform_machine": "x86_64",
|
||||
"platform_python_implementation": "CPython",
|
||||
"platform_release": "16.7.0",
|
||||
"platform_system": "Darwin",
|
||||
"platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64",
|
||||
"python_full_version": "3.6.3",
|
||||
"python_full_version": "3.6.2",
|
||||
"python_version": "3.6",
|
||||
"sys_platform": "darwin"
|
||||
},
|
||||
|
||||
@@ -12,13 +12,13 @@ testPipenvLock() {
|
||||
|
||||
testPipenvVersion() {
|
||||
compile "pipenv-version"
|
||||
assertCaptured "3.6.4"
|
||||
assertCaptured "3.6.2"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
testPipenvFullVersion() {
|
||||
compile "pipenv-full-version"
|
||||
assertCaptured "3.6.3"
|
||||
assertCaptured "3.6.2"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ testPython2() {
|
||||
|
||||
testPython3() {
|
||||
compile "python3"
|
||||
assertCaptured "python-3.6.4"
|
||||
assertCaptured "python-3.6.2"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -25,9 +25,9 @@ SHUNIT_ERROR=2
|
||||
# enable strict mode by default
|
||||
SHUNIT_STRICT=${SHUNIT_STRICT:-${SHUNIT_TRUE}}
|
||||
|
||||
_shunit_warn() { echo "shunit2:WARN $*" >&2; }
|
||||
_shunit_error() { echo "shunit2:ERROR $*" >&2; }
|
||||
_shunit_fatal() { echo "shunit2:FATAL $*" >&2; exit ${SHUNIT_ERROR}; }
|
||||
_shunit_warn() { echo "shunit2:WARN $@" >&2; }
|
||||
_shunit_error() { echo "shunit2:ERROR $@" >&2; }
|
||||
_shunit_fatal() { echo "shunit2:FATAL $@" >&2; exit ${SHUNIT_ERROR}; }
|
||||
|
||||
# specific shell checks
|
||||
if [ -n "${ZSH_VERSION:-}" ]; then
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ capture()
|
||||
|
||||
LAST_COMMAND="$@"
|
||||
|
||||
"$@" >${STD_OUT} 2>${STD_ERR}
|
||||
$@ >${STD_OUT} 2>${STD_ERR}
|
||||
RETURN=$?
|
||||
rtrn=${RETURN} # deprecated
|
||||
}
|
||||
|
||||
Vendored
-3
@@ -1,5 +1,2 @@
|
||||
# Automatic configuration for Gunicorn's ForwardedAllowIPS setting.
|
||||
export FORWARDED_ALLOW_IPS='*'
|
||||
|
||||
# Automatic configuration for Gunicorn's stdout access log setting.
|
||||
export GUNICORN_CMD_ARGS=${GUNICORN_CMD_ARGS:-"--access-logfile -"}
|
||||
|
||||
Vendored
+3
-3
@@ -25,9 +25,9 @@ SHUNIT_ERROR=2
|
||||
# enable strict mode by default
|
||||
SHUNIT_STRICT=${SHUNIT_STRICT:-${SHUNIT_TRUE}}
|
||||
|
||||
_shunit_warn() { echo "shunit2:WARN $*" >&2; }
|
||||
_shunit_error() { echo "shunit2:ERROR $*" >&2; }
|
||||
_shunit_fatal() { echo "shunit2:FATAL $*" >&2; exit ${SHUNIT_ERROR}; }
|
||||
_shunit_warn() { echo "shunit2:WARN $@" >&2; }
|
||||
_shunit_error() { echo "shunit2:ERROR $@" >&2; }
|
||||
_shunit_fatal() { echo "shunit2:FATAL $@" >&2; exit ${SHUNIT_ERROR}; }
|
||||
|
||||
# specific shell checks
|
||||
if [ -n "${ZSH_VERSION:-}" ]; then
|
||||
|
||||
Vendored
+1
-1
@@ -36,7 +36,7 @@ capture()
|
||||
|
||||
LAST_COMMAND="$@"
|
||||
|
||||
"$@" >${STD_OUT} 2>${STD_ERR}
|
||||
$@ >${STD_OUT} 2>${STD_ERR}
|
||||
RETURN=$?
|
||||
rtrn=${RETURN} # deprecated
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user