mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
8cb379f83b
Adds support for: * CPython 2.7.18, 3.5.9, 3.7.7 and 3.8.3 * PyPy 2.7 and 3.6, version 7.3.1 The binaries will need generating and uploading before CI will pass. Note: Whilst the build script for CPython 3.8.3 did already exist in the repository, it appears to have been accidentally created in #920, which predated the existence of that version of Python - so the binaries do not exist on S3. The Heroku-18 Docker image tag has also been unpinned, since the new libssl version is now available at runtime in all environments, so we don't need to force building against the older version of the headers. Fixes W-7582174.
28 lines
799 B
Bash
Executable File
28 lines
799 B
Bash
Executable File
#!/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 '{}' +
|