diff --git a/CHANGELOG.md b/CHANGELOG.md index b058c0d..9c1c7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Python Buildpack Changelog +# 151 (2019-03-) + +Python 3.5.7 and 3.4.10 now available on all Heroku stacks. + # 150 (2019-03-13) Python 2.7.16 now available on all Heroku stacks. diff --git a/bin/default_pythons b/bin/default_pythons index 7036aae..dbdb106 100755 --- a/bin/default_pythons +++ b/bin/default_pythons @@ -3,8 +3,8 @@ DEFAULT_PYTHON_VERSION="python-3.6.8" LATEST_36="python-3.6.8" LATEST_37="python-3.7.2" -LATEST_35="python-3.5.6" -LATEST_34="python-3.4.9" +LATEST_35="python-3.5.7" +LATEST_34="python-3.4.10" LATEST_27="python-2.7.16" export DEFAULT_PYTHON_VERSION LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27 diff --git a/builds/runtimes/python-3.4.10 b/builds/runtimes/python-3.4.10 new file mode 100755 index 0000000..4d74b89 --- /dev/null +++ b/builds/runtimes/python-3.4.10 @@ -0,0 +1,32 @@ +#!/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/3.7.2/Python-3.7.2.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-3.7.2 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 '{}' + + +# Remove spare / +LOCATION=${OUT_PREFIX%?} + +ln $LOCATION/bin/python3 $LOCATION/bin/python diff --git a/builds/runtimes/python-3.5.7 b/builds/runtimes/python-3.5.7 new file mode 100755 index 0000000..4d74b89 --- /dev/null +++ b/builds/runtimes/python-3.5.7 @@ -0,0 +1,32 @@ +#!/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/3.7.2/Python-3.7.2.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-3.7.2 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 '{}' + + +# Remove spare / +LOCATION=${OUT_PREFIX%?} + +ln $LOCATION/bin/python3 $LOCATION/bin/python diff --git a/test/fixtures/python3_4_fail/runtime.txt b/test/fixtures/python3_4_fail/runtime.txt index 3b5c63e..1314c85 100644 --- a/test/fixtures/python3_4_fail/runtime.txt +++ b/test/fixtures/python3_4_fail/runtime.txt @@ -1 +1 @@ -python-3.4.10 +python-3.4.99 diff --git a/test/fixtures/python3_5_fail/runtime.txt b/test/fixtures/python3_5_fail/runtime.txt index df4118a..92d15aa 100644 --- a/test/fixtures/python3_5_fail/runtime.txt +++ b/test/fixtures/python3_5_fail/runtime.txt @@ -1 +1 @@ -python-3.5.7 +python-3.5.99 diff --git a/test/fixtures/python3_6_fail/runtime.txt b/test/fixtures/python3_6_fail/runtime.txt index 5c517d3..f0e0c19 100644 --- a/test/fixtures/python3_6_fail/runtime.txt +++ b/test/fixtures/python3_6_fail/runtime.txt @@ -1 +1 @@ -python-3.6.9 +python-3.6.99 diff --git a/test/fixtures/python3_7_fail/runtime.txt b/test/fixtures/python3_7_fail/runtime.txt index 6f651a3..e7217e5 100644 --- a/test/fixtures/python3_7_fail/runtime.txt +++ b/test/fixtures/python3_7_fail/runtime.txt @@ -1 +1 @@ -python-3.7.3 +python-3.7.99