Skip to content

Commit 83d5d6c

Browse files
authored
Merge pull request #722 from heroku/python-3.7-and-3.6.6
Build Python 3.6.6 and 3.7.0
2 parents d18f1fe + abade31 commit 83d5d6c

File tree

6 files changed

+53
-6
lines changed

6 files changed

+53
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Python Buildpack Changelog
22

3+
# 136
4+
5+
Upgrade to 3.6.6 and support 3.7.0 on all runtimes.
6+
37
# 135
48

59
Upgrade Pipenv to v2018.5.18.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Deploying a Python application couldn't be easier:
2323
$ git push heroku master
2424
2525
-----> Python app detected
26-
-----> Installing python-3.6.5
26+
-----> Installing python-3.6.6
2727
-----> Installing pip
2828
-----> Installing requirements with Pipenv 2018.5.18…
2929
...
@@ -58,5 +58,6 @@ Or, with a `runtime.txt` file:
5858

5959
Runtime options include:
6060

61-
- `python-3.6.5`
61+
- `python-3.7.0`
62+
- `python-3.6.6`
6263
- `python-2.7.15`

bin/compile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export VENDOR_URL
4949
# These variables are used to specify which versions of Python to install by default,
5050
# as well as prompt the user to upgrade if they are using an un–supported version.
5151
# Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37.
52-
DEFAULT_PYTHON_VERSION="python-3.6.5"
53-
LATEST_3="python-3.6.5"
52+
DEFAULT_PYTHON_VERSION="python-3.6.6"
53+
LATEST_3="python-3.6.6"
5454
LATEST_2="python-2.7.15"
5555

5656
# Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)?

builds/runtimes/python-3.6.6

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
# Build Path: /app/.heroku/python/
3+
# Build Deps: libraries/sqlite
4+
5+
OUT_PREFIX=$1
6+
7+
echo "Building Python…"
8+
SOURCE_TARBALL='https://python.org/ftp/python/3.6.6/Python-3.6.6.tgz'
9+
curl -L $SOURCE_TARBALL | tar xz
10+
mv Python-3.6.6 src
11+
cd src
12+
13+
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
14+
make
15+
make install
16+
17+
# Remove unneeded test directories, similar to the official Docker Python images:
18+
# https://github.com/docker-library/python
19+
find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' +
20+
21+
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python

builds/runtimes/python-3.7.0

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
# Build Path: /app/.heroku/python/
3+
# Build Deps: libraries/sqlite
4+
5+
OUT_PREFIX=$1
6+
7+
echo "Building Python…"
8+
SOURCE_TARBALL='https://python.org/ftp/python/3.7.0/Python-3.7.0.tgz'
9+
curl -L $SOURCE_TARBALL | tar xz
10+
mv Python-3.7.0 src
11+
cd src
12+
13+
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
14+
make
15+
make install
16+
17+
# Remove unneeded test directories, similar to the official Docker Python images:
18+
# https://github.com/docker-library/python
19+
find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm -rf '{}' +
20+
21+
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python

test/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ testPipenvLock() {
1212

1313
testPipenvVersion() {
1414
compile "pipenv-version"
15-
assertCaptured "3.6.5"
15+
assertCaptured "3.6.6"
1616
assertCapturedSuccess
1717
}
1818

@@ -83,7 +83,7 @@ testPython2() {
8383

8484
testPython3() {
8585
compile "python3"
86-
assertCaptured "python-3.6.5"
86+
assertCaptured "python-3.6.6"
8787
assertCapturedSuccess
8888
}
8989

0 commit comments

Comments
 (0)