mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
71 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c126f6239d | |||
| 7f639739e3 | |||
| 4328847f1e | |||
| c79e6f02ad | |||
| 1d938c35f8 | |||
| 99a2a55f6a | |||
| 79dbd79b13 | |||
| 0b4a2d664b | |||
| 3726d3b473 | |||
| 9b72199cdf | |||
| 22e6239222 | |||
| 39e4e85747 | |||
| 05612fa1eb | |||
| fb1ca18e90 | |||
| 0207d8aff0 | |||
| 6bf3a75da2 | |||
| 011f1e7e60 | |||
| 0b804b186c | |||
| ec56074c18 | |||
| 34508bfc35 | |||
| af1ef93311 | |||
| 0fc7b6c186 | |||
| 33cd4a5fe1 | |||
| 7ff7fa4462 | |||
| 9a830367fe | |||
| 521ed3ff60 | |||
| a165486180 | |||
| d7327b8d13 | |||
| 47c6dbab32 | |||
| 23adcc42c4 | |||
| cc2d1ad17f | |||
| 91a0be91e1 | |||
| 4a4a6a1df0 | |||
| b30838072f | |||
| 950572132c | |||
| fe5da9a0a6 | |||
| 4eed56e2e5 | |||
| 00d44d2e34 | |||
| 0c78978e90 | |||
| d0fd9ad58a | |||
| 24e0858902 | |||
| 1721fa3703 | |||
| 970b6c1e4b | |||
| 89145ef839 | |||
| cacd163958 | |||
| cd4601a707 | |||
| 05e29c74bc | |||
| dbfdb5a356 | |||
| 8512fcb811 | |||
| 6b328504de | |||
| b4553d4bee | |||
| af860be62a | |||
| 2be890d2e8 | |||
| e936ff00c3 | |||
| 3096299184 | |||
| ffc7359b19 | |||
| 7a313c53a5 | |||
| 98df315cfa | |||
| df18c0485d | |||
| 629ab233bf | |||
| fe6a81d513 | |||
| 75ce3f537d | |||
| a51d5f2976 | |||
| b2b12d0355 | |||
| 15ecb76950 | |||
| adba08788c | |||
| e3d6bc8436 | |||
| 6e4b43fa1d | |||
| 3fef7caf50 | |||
| 0c701de466 | |||
| c410fd36a6 |
@@ -0,0 +1,12 @@
|
||||
name: Check Changelog
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Check that CHANGELOG is touched
|
||||
run: |
|
||||
cat $GITHUB_EVENT_PATH | jq .pull_request.title | grep -i '\[\(\(changelog skip\)\|\(ci skip\)\)\]' || git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md
|
||||
@@ -2,7 +2,20 @@
|
||||
|
||||
# Master
|
||||
|
||||
- Python 2.7.17 now available on Heroku 18 and 16.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
# 158 (2019-10-21)
|
||||
|
||||
- Python 3.7.5 and 3.8.0 now available on Heroku 18 and 16.
|
||||
- Add support for Python 3.8 branch
|
||||
- Sqlite3 Update:
|
||||
- Test Improvements
|
||||
- Add support for staging binary testing
|
||||
|
||||
# 157 (2019-09-18)
|
||||
|
||||
- Typo fixes
|
||||
|
||||
# 156 (2019-09-12)
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@ export BUILD_DIR CACHE_DIR ENV_DIR
|
||||
VENDOR_URL="https://lang-python.s3.amazonaws.com/$STACK"
|
||||
if [[ -n ${BUILDPACK_VENDOR_URL:-} ]]; then
|
||||
VENDOR_URL="$BUILDPACK_VENDOR_URL"
|
||||
elif [[ -n ${USE_STAGING_BINARIES} ]]; then
|
||||
VENDOR_URL="$USE_STAGING_BINARIES/$STACK"
|
||||
fi
|
||||
export VENDOR_URL
|
||||
|
||||
@@ -50,6 +52,7 @@ export VENDOR_URL
|
||||
source "$BIN_DIR/default_pythons"
|
||||
|
||||
# Supported Python Branches
|
||||
PY38="python-3.8"
|
||||
PY37="python-3.7"
|
||||
PY36="python-3.6"
|
||||
PY35="python-3.5"
|
||||
|
||||
+4
-3
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
DEFAULT_PYTHON_VERSION="python-3.6.9"
|
||||
LATEST_38="python-3.8.0"
|
||||
LATEST_37="python-3.7.5"
|
||||
LATEST_36="python-3.6.9"
|
||||
LATEST_37="python-3.7.4"
|
||||
LATEST_35="python-3.5.7"
|
||||
LATEST_34="python-3.4.10"
|
||||
LATEST_27="python-2.7.16"
|
||||
LATEST_27="python-2.7.17"
|
||||
|
||||
export DEFAULT_PYTHON_VERSION LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27
|
||||
export DEFAULT_PYTHON_VERSION LATEST_38 LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27
|
||||
|
||||
@@ -13,7 +13,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
|
||||
|
||||
|
||||
if ! pip-diff --stale requirements-declared.txt requirements.txt --exclude setuptools pip wheel > .heroku/python/requirements-stale.txt; then
|
||||
mount "failure.bad-requirements"
|
||||
mcount "failure.bad-requirements"
|
||||
fi
|
||||
|
||||
rm -fr requirements-declared.txt
|
||||
|
||||
@@ -11,6 +11,13 @@ SECURITY_UPDATE="Python has released a security update! Please consider upgradin
|
||||
|
||||
# check if runtime exists
|
||||
if curl --output /dev/null --silent --head --fail "$VENDORED_PYTHON"; then
|
||||
if [[ "$PYTHON_VERSION" == $PY38* ]]; then
|
||||
# do things to alert the user of security release available
|
||||
if [ "$PYTHON_VERSION" != "$LATEST_38" ]; then
|
||||
puts-warn "$SECURITY_UPDATE" "$LATEST_38"
|
||||
echo " Learn More: https://devcenter.heroku.com/articles/python-runtimes"
|
||||
fi
|
||||
fi
|
||||
if [[ "$PYTHON_VERSION" == $PY37* ]]; then
|
||||
# do things to alert the user of security release available
|
||||
if [ "$PYTHON_VERSION" != "$LATEST_37" ]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM heroku/heroku:18-build
|
||||
FROM heroku/heroku:18-build.v16
|
||||
|
||||
WORKDIR /app
|
||||
ENV WORKSPACE_DIR="/app/builds" \
|
||||
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
|
||||
OUT_PREFIX=$1
|
||||
BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin"
|
||||
export BIN_DIR
|
||||
|
||||
# shellcheck source=bin/utils
|
||||
source "$BIN_DIR/steps/sqlite3"
|
||||
|
||||
sqlite3_version
|
||||
echo "Setting up SQLite3 Headers for $SQLITE3_VERSION"
|
||||
sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1
|
||||
|
||||
echo "Building Python…"
|
||||
SOURCE_TARBALL='https://python.org/ftp/python/2.7.17/Python-2.7.17.tgz'
|
||||
curl -L $SOURCE_TARBALL | tar xz
|
||||
mv Python-2.7.17 src
|
||||
cd src
|
||||
|
||||
./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --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 '{}' +
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
|
||||
source $(dirname $0)/python3
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
|
||||
source $(dirname $0)/python3
|
||||
+1
@@ -0,0 +1 @@
|
||||
pysqlite
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
python-2.7.16
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
python-2.7.16
|
||||
python-2.7.17
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
python-3.4.0
|
||||
python-3.4.9
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
requests
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
python-3.8.0
|
||||
@@ -0,0 +1 @@
|
||||
flask
|
||||
+1
@@ -0,0 +1 @@
|
||||
python-3.8.99
|
||||
@@ -40,6 +40,12 @@ testPsycopg2() {
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
testPysqlite() {
|
||||
compile "pysqlite"
|
||||
assertCaptured "pysqlite"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
testCffi() {
|
||||
compile "cffi"
|
||||
assertCaptured "cffi"
|
||||
|
||||
+30
-7
@@ -9,6 +9,7 @@ testPythonDefault() {
|
||||
compile "pythonDefault"
|
||||
assertCaptured $DEFAULT_PYTHON_VERSION
|
||||
assertNotCaptured "security update"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -18,6 +19,7 @@ testPython2() {
|
||||
compile "python2"
|
||||
assertCaptured $LATEST_27
|
||||
assertNotCaptured "security update"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -25,6 +27,7 @@ testPython2_warn() {
|
||||
compile "python2_warn"
|
||||
assertCaptured "python-2.7.15"
|
||||
assertCaptured "security update!"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -46,13 +49,9 @@ testPython3_4() {
|
||||
|
||||
testPython3_4_warn() {
|
||||
compile "python3_4_warn"
|
||||
if [[ $STACK = "cedar-14" ]]; then
|
||||
assertCaptured "python-3.4.0"
|
||||
assertCaptured "security update!"
|
||||
assertCapturedSuccess
|
||||
else
|
||||
assertCapturedError
|
||||
fi
|
||||
assertCaptured "python-3.4.9"
|
||||
assertCaptured "security update!"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
testPython3_4_fail() {
|
||||
@@ -67,6 +66,7 @@ testPython3_5() {
|
||||
compile "python3_5"
|
||||
assertCaptured $LATEST_35
|
||||
assertNotCaptured "security update"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
fi
|
||||
}
|
||||
@@ -93,6 +93,7 @@ testPython3_6() {
|
||||
compile "python3_6"
|
||||
assertCaptured $LATEST_36
|
||||
assertNotCaptured "security update"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -100,6 +101,7 @@ testPython3_6_warn() {
|
||||
compile "python3_6_warn"
|
||||
assertCaptured "python-3.6.7"
|
||||
assertCaptured "security update!"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -117,6 +119,7 @@ testPython3_7() {
|
||||
else
|
||||
assertNotCaptured "security update"
|
||||
assertCaptured $LATEST_37
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
fi
|
||||
}
|
||||
@@ -128,6 +131,7 @@ testPython3_7_warn() {
|
||||
else
|
||||
assertCaptured "python-3.7.1"
|
||||
assertCaptured "security update!"
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
fi
|
||||
}
|
||||
@@ -138,6 +142,25 @@ testPython3_7_fail() {
|
||||
assertCapturedError
|
||||
}
|
||||
|
||||
testPython3_8() {
|
||||
updateVersion "python3_8" $LATEST_38
|
||||
compile "python3_8"
|
||||
if [[ $STACK = "cedar-14" ]]; then
|
||||
assertCapturedError
|
||||
else
|
||||
assertNotCaptured "security update"
|
||||
assertCaptured $LATEST_38
|
||||
assertCaptured "Installing SQLite3"
|
||||
assertCapturedSuccess
|
||||
fi
|
||||
}
|
||||
|
||||
testPython3_8_fail() {
|
||||
compile "python3_8_fail"
|
||||
assertCaptured "Aborting"
|
||||
assertCapturedError
|
||||
}
|
||||
|
||||
pushd $(dirname 0) >/dev/null
|
||||
popd >/dev/null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user