Skip to content

Commit c126f62

Browse files
authored
Merge pull request #891 from heroku/python-27-update
Python 2.7.17
2 parents 1d938c3 + 7f63973 commit c126f62

File tree

4 files changed

+31
-2
lines changed

4 files changed

+31
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Master
44

5+
- Python 2.7.17 now available on Heroku 18 and 16.
6+
57
--------------------------------------------------------------------------------
68
# 158 (2019-10-21)
79

bin/default_pythons

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ LATEST_37="python-3.7.5"
66
LATEST_36="python-3.6.9"
77
LATEST_35="python-3.5.7"
88
LATEST_34="python-3.4.10"
9-
LATEST_27="python-2.7.16"
9+
LATEST_27="python-2.7.17"
1010

1111
export DEFAULT_PYTHON_VERSION LATEST_38 LATEST_37 LATEST_36 LATEST_35 LATEST_34 LATEST_27

builds/runtimes/python-2.7.17

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
# Build Path: /app/.heroku/python/
3+
4+
OUT_PREFIX=$1
5+
BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin"
6+
export BIN_DIR
7+
8+
# shellcheck source=bin/utils
9+
source "$BIN_DIR/steps/sqlite3"
10+
11+
sqlite3_version
12+
echo "Setting up SQLite3 Headers for $SQLITE3_VERSION"
13+
sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1
14+
15+
echo "Building Python…"
16+
SOURCE_TARBALL='https://python.org/ftp/python/2.7.17/Python-2.7.17.tgz'
17+
curl -L $SOURCE_TARBALL | tar xz
18+
mv Python-2.7.17 src
19+
cd src
20+
21+
./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --with-ensurepip=no
22+
make
23+
make install
24+
25+
# Remove unneeded test directories, similar to the official Docker Python images:
26+
# https://github.com/docker-library/python
27+
find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' +

test/fixtures/python2/runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
python-2.7.16
1+
python-2.7.17

0 commit comments

Comments
 (0)