From 7c4f55bc324d0280a4c0b91c4daf8b4d649d37e6 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Wed, 12 Aug 2020 15:19:53 +0100 Subject: [PATCH] Switch the remaining build formulas to the shared script approach (#1049) To be consistent with the other build formulas after #799. Refs @W-7947035@. [skip changelog] --- builds/runtimes/python-2.7.17 | 25 +------------------------ builds/runtimes/python-2.7.18 | 25 +------------------------ builds/runtimes/python-3.4.9 | 30 +----------------------------- 3 files changed, 3 insertions(+), 77 deletions(-) diff --git a/builds/runtimes/python-2.7.17 b/builds/runtimes/python-2.7.17 index 6dada70..ef21c72 100755 --- a/builds/runtimes/python-2.7.17 +++ b/builds/runtimes/python-2.7.17 @@ -1,27 +1,4 @@ #!/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 '{}' + +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.18 b/builds/runtimes/python-2.7.18 index 155e16d..ef21c72 100755 --- a/builds/runtimes/python-2.7.18 +++ b/builds/runtimes/python-2.7.18 @@ -1,27 +1,4 @@ #!/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.18/Python-2.7.18.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.18 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 '{}' + +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-3.4.9 b/builds/runtimes/python-3.4.9 index 00cf507..ad41723 100755 --- a/builds/runtimes/python-3.4.9 +++ b/builds/runtimes/python-3.4.9 @@ -1,32 +1,4 @@ #!/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.4.9/Python-3.4.9.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.4.9 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 +source $(dirname $0)/python3