File tree Expand file tree Collapse file tree 7 files changed +16
-17
lines changed
Expand file tree Collapse file tree 7 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Replace ` BUILDPACK_VENDOR_URL ` and ` USE_STAGING_BINARIES ` with ` BUILDPACK_S3_BASE_URL ` (#1085 ).
56
67## v181 (2020-09-29)
78
Original file line number Diff line number Diff line change @@ -37,17 +37,15 @@ ENV_DIR=$3
3737# Export Path variables, for use in sub-scripts.
3838export BUILD_DIR CACHE_DIR ENV_DIR
3939
40- # Set the Buildpack's internet target for downloading Python distributions .
41- # The user can provide BUILDPACK_VENDOR_URL to specify a custom target.
40+ # Set the base URL for downloading buildpack assets like Python runtimes .
41+ # The user can provide BUILDPACK_S3_BASE_URL to specify a custom target.
4242# Note: this is designed for non-Heroku use, as it does not use the user-provided
4343# environment variable mechanism (the ENV_DIR).
44- VENDOR_URL=" https://lang-python.s3.amazonaws.com/$STACK "
45- if [[ -n ${BUILDPACK_VENDOR_URL:- } ]]; then
46- VENDOR_URL=" $BUILDPACK_VENDOR_URL "
47- elif [[ -n ${USE_STAGING_BINARIES} ]]; then
48- VENDOR_URL=" $USE_STAGING_BINARIES /$STACK "
49- fi
50- export VENDOR_URL
44+ DEFAULT_S3_BASE_URL=' https://lang-python.s3.amazonaws.com'
45+ S3_BASE_URL=" ${BUILDPACK_S3_BASE_URL:- ${DEFAULT_S3_BASE_URL} } "
46+ # This has to be exported since it's used by the geo-libs step which is run in a subshell.
47+ # TODO: Stop exporting once the geo-libs step is removed or no longer uses `sub_env`.
48+ export S3_BASE_URL
5149
5250# Default Python Versions
5351# shellcheck source=bin/default_pythons
Original file line number Diff line number Diff line change 1010# This script is invoked by [`bin/compile`](/).
1111
1212# The location of the pre-compiled cryptography binary.
13- VENDORED_GDAL=" ${VENDOR_URL } /libraries/vendor/gdal.tar.gz"
13+ VENDORED_GDAL=" ${S3_BASE_URL} / ${STACK } /libraries/vendor/gdal.tar.gz"
1414
1515PKG_CONFIG_PATH=" /app/.heroku/vendor/lib/pkgconfig:$PKG_CONFIG_PATH "
1616
Original file line number Diff line number Diff line change 1010# This script is invoked by [`bin/compile`](/).
1111
1212# The location of the pre-compiled cryptography binary.
13- VENDORED_GDAL=" ${VENDOR_URL } /libraries/vendor/gdal.tar.gz"
14- VENDORED_GEOS=" ${VENDOR_URL } /libraries/vendor/geos.tar.gz"
15- VENDORED_PROJ=" ${VENDOR_URL } /libraries/vendor/proj.tar.gz"
13+ VENDORED_GDAL=" ${S3_BASE_URL} / ${STACK } /libraries/vendor/gdal.tar.gz"
14+ VENDORED_GEOS=" ${S3_BASE_URL} / ${STACK } /libraries/vendor/geos.tar.gz"
15+ VENDORED_PROJ=" ${S3_BASE_URL} / ${STACK } /libraries/vendor/proj.tar.gz"
1616
1717PKG_CONFIG_PATH=" /app/.heroku/vendor/lib/pkgconfig:$PKG_CONFIG_PATH "
1818
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ if [[ "$STACK" != "cedar-14" ]]; then
1515fi
1616
1717# The location of the pre-compiled libmemcached binary.
18- VENDORED_MEMCACHED=" ${VENDOR_URL } /libraries/vendor/libmemcache.tar.gz"
18+ VENDORED_MEMCACHED=" ${S3_BASE_URL} / ${STACK } /libraries/vendor/libmemcache.tar.gz"
1919
2020# Syntax sugar.
2121# shellcheck source=bin/utils
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ runtime-fixer runtime.txt
55PYTHON_VERSION=$( cat runtime.txt)
66
77# The location of the pre-compiled python binary.
8- VENDORED_PYTHON=" ${VENDOR_URL} / runtimes/$PYTHON_VERSION .tar.gz"
8+ VENDORED_PYTHON=" ${S3_BASE_URL} / ${STACK} / runtimes/${ PYTHON_VERSION} .tar.gz"
99
1010SECURITY_UPDATE=" Python has released a security update! Please consider upgrading to"
1111SECURITY_UPDATE_PYPY=" The PyPy project has released a security update! Please consider upgrading to"
160160# Instead, we use the pip wheel to install itself, using the method described here:
161161# https://github.com/pypa/pip/issues/2351#issuecomment-69994524
162162PIP_WHEEL_FILENAME=" pip-${PIP_VERSION} -py2.py3-none-any.whl"
163- PIP_WHEEL_URL=" https://lang-python.s3.amazonaws.com /common/${PIP_WHEEL_FILENAME} "
163+ PIP_WHEEL_URL=" ${S3_BASE_URL} /common/${PIP_WHEEL_FILENAME} "
164164PIP_WHEEL=" ${TMPDIR:-/ tmp} /${PIP_WHEEL_FILENAME} "
165165
166166if ! curl -sSf " ${PIP_WHEEL_URL} " -o " $PIP_WHEEL " ; then
Original file line number Diff line number Diff line change @@ -113,10 +113,10 @@ testHooks() {
113113 PROFILE_PATH
114114 PWD
115115 PYTHONUNBUFFERED
116+ S3_BASE_URL
116117 SHLVL
117118 SOME_APP_CONFIG_VAR
118119 STACK
119- VENDOR_URL
120120 )
121121 if [[ " ${STACK} " == " cedar-14" || " ${STACK} " == " heroku-16" ]]; then
122122 # Remove "OLDPWD" from expected_env_vars since for bash <4.4 it's not exported to subshells:
You can’t perform that action at this time.
0 commit comments