From ae4713efd8370a107f168a1aa1d9544228777495 Mon Sep 17 00:00:00 2001 From: Casey Faist <caseylfaist@gmail.com> Date: Mon, 22 Oct 2018 14:30:25 -0500 Subject: [PATCH] add new runtimes and test repos --- builds/runtimes/python-3.5.6 | 29 +++++++++++++++++++ builds/runtimes/python-3.6.7 | 29 +++++++++++++++++++ builds/runtimes/python-3.7.1 | 29 +++++++++++++++++++ .../{python3 => python3_5}/requirements.txt | 0 test/fixtures/python3_5/runtime.txt | 1 + test/fixtures/python3_6/requirements.txt | 1 + test/fixtures/python3_6/runtime.txt | 1 + test/fixtures/python3_7/requirements.txt | 1 + test/fixtures/python3_7/runtime.txt | 1 + 9 files changed, 92 insertions(+) create mode 100755 builds/runtimes/python-3.5.6 create mode 100755 builds/runtimes/python-3.6.7 create mode 100755 builds/runtimes/python-3.7.1 rename test/fixtures/{python3 => python3_5}/requirements.txt (100%) create mode 100644 test/fixtures/python3_5/runtime.txt create mode 100644 test/fixtures/python3_6/requirements.txt create mode 100644 test/fixtures/python3_6/runtime.txt create mode 100644 test/fixtures/python3_7/requirements.txt create mode 100644 test/fixtures/python3_7/runtime.txt diff --git a/builds/runtimes/python-3.5.6 b/builds/runtimes/python-3.5.6 new file mode 100755 index 00000000..0ee79d57 --- /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 00000000..9d43de8e --- /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 00000000..a4ad45f2 --- /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 00000000..e6391f4a --- /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 00000000..663bd1f6 --- /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 00000000..34b35b71 --- /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 00000000..663bd1f6 --- /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 00000000..4255f73a --- /dev/null +++ b/test/fixtures/python3_7/runtime.txt @@ -0,0 +1 @@ +python-3.7.1 -- GitLab