diff --git a/builds/runtimes/python-3.5.6 b/builds/runtimes/python-3.5.6 new file mode 100755 index 0000000..0ee79d5 --- /dev/null +++ b/builds/runtimes/python-3.5.6 @@ -0,0 +1,29 @@ +#!/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.5.6/Python-3.5.6.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-3.7.0 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 diff --git a/builds/runtimes/python-3.6.7 b/builds/runtimes/python-3.6.7 new file mode 100755 index 0000000..9d43de8 --- /dev/null +++ b/builds/runtimes/python-3.6.7 @@ -0,0 +1,29 @@ +#!/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.6.7/Python-3.6.7.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-3.7.0 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 diff --git a/builds/runtimes/python-3.7.1 b/builds/runtimes/python-3.7.1 new file mode 100755 index 0000000..a4ad45f --- /dev/null +++ b/builds/runtimes/python-3.7.1 @@ -0,0 +1,29 @@ +#!/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.1/Python-3.7.1.tgz' +curl -L $SOURCE_TARBALL | tar xz +mv Python-3.7.0 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 diff --git a/test/fixtures/python3/requirements.txt b/test/fixtures/python3_5/requirements.txt similarity index 100% rename from test/fixtures/python3/requirements.txt rename to test/fixtures/python3_5/requirements.txt diff --git a/test/fixtures/python3_5/runtime.txt b/test/fixtures/python3_5/runtime.txt new file mode 100644 index 0000000..e6391f4 --- /dev/null +++ b/test/fixtures/python3_5/runtime.txt @@ -0,0 +1 @@ +python-3.5.6 diff --git a/test/fixtures/python3_6/requirements.txt b/test/fixtures/python3_6/requirements.txt new file mode 100644 index 0000000..663bd1f --- /dev/null +++ b/test/fixtures/python3_6/requirements.txt @@ -0,0 +1 @@ +requests \ No newline at end of file diff --git a/test/fixtures/python3_6/runtime.txt b/test/fixtures/python3_6/runtime.txt new file mode 100644 index 0000000..34b35b7 --- /dev/null +++ b/test/fixtures/python3_6/runtime.txt @@ -0,0 +1 @@ +python-3.6.7 diff --git a/test/fixtures/python3_7/requirements.txt b/test/fixtures/python3_7/requirements.txt new file mode 100644 index 0000000..663bd1f --- /dev/null +++ b/test/fixtures/python3_7/requirements.txt @@ -0,0 +1 @@ +requests \ No newline at end of file diff --git a/test/fixtures/python3_7/runtime.txt b/test/fixtures/python3_7/runtime.txt new file mode 100644 index 0000000..4255f73 --- /dev/null +++ b/test/fixtures/python3_7/runtime.txt @@ -0,0 +1 @@ +python-3.7.1