Skip to content

Commit 3c0146c

Browse files
authored
Merge pull request #797 from heroku/v-147
V 147
2 parents fe029af + 53c7d61 commit 3c0146c

File tree

17 files changed

+96
-28
lines changed

17 files changed

+96
-28
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ jobs:
1010
include:
1111
- stage: Bash linting (shellcheck)
1212
sudo: false
13-
before_install:
14-
- wget -c https://goo.gl/ZzKHFv -O - | tar -xvJ -C /tmp/
15-
- PATH="/tmp/shellcheck-latest:$PATH"
1613
script: make check
1714
- stage: Stack Unit Tests
1815
services: docker

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Python Buildpack Changelog
22

3-
# 146 (2018-15-08)
3+
# 147 (2019-02-07)
4+
5+
Python 3.7.2 and 3.6.8 now available on all Heroku stacks.
6+
7+
# 146 (2018-11-11)
48

59
Python 3.7.1, 3.6.7, 3.5.6 and 3.4.9 now available on all Heroku stacks.
610

bin/compile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ 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.7"
53-
LATEST_36="python-3.6.7"
54-
LATEST_37="python-3.7.1"
52+
DEFAULT_PYTHON_VERSION="python-3.6.8"
53+
LATEST_36="python-3.6.8"
54+
LATEST_37="python-3.7.2"
5555
LATEST_35="python-3.5.6"
5656
LATEST_34="python-3.4.9"
5757
LATEST_27="python-2.7.15"

bin/steps/pip-install

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
3838
mcount "failure.none-version"
3939
fi
4040

41-
41+
if [ ! -f "$BUILD_DIR/.heroku/python/bin/pip" ]; then
42+
exit 1
43+
fi
4244
/app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
4345
PIP_STATUS="${PIPESTATUS[0]}"
4446
set -e

bin/steps/python

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
109109

110110
/app/.heroku/python/bin/python "$ROOT_DIR/vendor/get-pip.py" pip=="$PIP_UPDATE" &> /dev/null
111111
/app/.heroku/python/bin/pip install "$ROOT_DIR/vendor/setuptools-39.0.1-py2.py3-none-any.whl" &> /dev/null
112-
113112
fi
114113

115114
set -e

builds/runtimes/python-3.6.8

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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/3.6.8/Python-3.6.8.tgz'
17+
curl -L $SOURCE_TARBALL | tar xz
18+
mv Python-3.6.8 src
19+
cd src
20+
21+
./configure --prefix=$OUT_PREFIX --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 '{}' +
28+
29+
# Remove spare /
30+
LOCATION=${OUT_PREFIX%?}
31+
32+
ln $LOCATION/bin/python3 $LOCATION/bin/python

builds/runtimes/python-3.7.2

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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/3.7.2/Python-3.7.2.tgz'
17+
curl -L $SOURCE_TARBALL | tar xz
18+
mv Python-3.7.2 src
19+
cd src
20+
21+
./configure --prefix=$OUT_PREFIX --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 '{}' +
28+
29+
# Remove spare /
30+
LOCATION=${OUT_PREFIX%?}
31+
32+
ln $LOCATION/bin/python3 $LOCATION/bin/python

spec/hatchet/python_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
it "🐍" do
55
Hatchet::Runner.new('python-getting-started', stack: DEFAULT_STACK).deploy do |app|
66
expect(app.output).to match(/Installing pip/)
7-
expect(app.run('python -V')).to match(/3.6.7/)
7+
expect(app.run('python -V')).to match(/3.6.8/)
88
end
99
end
1010
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
apache-airflow==1.10
1+
apache-airflow==1.10.2

test/fixtures/python3_6/runtime.txt

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

0 commit comments

Comments
 (0)