From 514c4948918c28b84a68486a4b06856df255e261 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 23 Dec 2019 00:08:04 -0500 Subject: [PATCH] Add new Python runtimes --- builds/runtimes/python-3.6.10 | 4 ++++ builds/runtimes/python-3.7.6 | 4 ++++ builds/runtimes/python-3.8.1 | 4 ++++ builds/runtimes/python3 | 8 +++----- 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100755 builds/runtimes/python-3.6.10 create mode 100755 builds/runtimes/python-3.7.6 create mode 100755 builds/runtimes/python-3.8.1 diff --git a/builds/runtimes/python-3.6.10 b/builds/runtimes/python-3.6.10 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.6.10 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.7.6 b/builds/runtimes/python-3.7.6 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.7.6 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.8.1 b/builds/runtimes/python-3.8.1 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.8.1 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python3 b/builds/runtimes/python3 index 1b6d152..6e7c517 100755 --- a/builds/runtimes/python3 +++ b/builds/runtimes/python3 @@ -16,6 +16,9 @@ python_version=${BASE^} # this gives us only the filename with version number version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz +echo "Building Python 3..." +echo "Pulling from source: ${dep_url}" + curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}" mv "${OUT_PREFIX}/${python_version}" src cd src @@ -31,9 +34,4 @@ find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm - # Remove spare / LOCATION=${OUT_PREFIX%?} -# Create links to SQLITE headers so Python can call them at runtime -mkdir -p ${OUT_PREFIX}/include ${OUT_PREFIX}/lib/x86_64-linux-gnu -cp /usr/include/sqlite3*.h ${OUT_PREFIX}/include -ln -fs $(realpath /usr/lib/x86_64-linux-gnu/libsqlite3.so) ${OUT_PREFIX}/lib/x86_64-linux-gnu/libsqlite3.so - ln $LOCATION/bin/python3 $LOCATION/bin/python