mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Merge pull request #722 from heroku/python-3.7-and-3.6.6
Build Python 3.6.6 and 3.7.0
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Python Buildpack Changelog
|
||||
|
||||
# 136
|
||||
|
||||
Upgrade to 3.6.6 and support 3.7.0 on all runtimes.
|
||||
|
||||
# 135
|
||||
|
||||
Upgrade Pipenv to v2018.5.18.
|
||||
|
||||
@@ -23,7 +23,7 @@ Deploying a Python application couldn't be easier:
|
||||
$ git push heroku master
|
||||
…
|
||||
-----> Python app detected
|
||||
-----> Installing python-3.6.5
|
||||
-----> Installing python-3.6.6
|
||||
-----> Installing pip
|
||||
-----> Installing requirements with Pipenv 2018.5.18…
|
||||
...
|
||||
@@ -58,5 +58,6 @@ Or, with a `runtime.txt` file:
|
||||
|
||||
Runtime options include:
|
||||
|
||||
- `python-3.6.5`
|
||||
- `python-3.7.0`
|
||||
- `python-3.6.6`
|
||||
- `python-2.7.15`
|
||||
|
||||
+2
-2
@@ -49,8 +49,8 @@ export VENDOR_URL
|
||||
# These variables are used to specify which versions of Python to install by default,
|
||||
# as well as prompt the user to upgrade if they are using an un–supported version.
|
||||
# Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37.
|
||||
DEFAULT_PYTHON_VERSION="python-3.6.5"
|
||||
LATEST_3="python-3.6.5"
|
||||
DEFAULT_PYTHON_VERSION="python-3.6.6"
|
||||
LATEST_3="python-3.6.6"
|
||||
LATEST_2="python-2.7.15"
|
||||
|
||||
# Which stack is used (for binary downloading), if none is provided (e.g. outside of Heroku)?
|
||||
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
# Build Deps: libraries/sqlite
|
||||
|
||||
OUT_PREFIX=$1
|
||||
|
||||
echo "Building Python…"
|
||||
SOURCE_TARBALL='https://python.org/ftp/python/3.6.6/Python-3.6.6.tgz'
|
||||
curl -L $SOURCE_TARBALL | tar xz
|
||||
mv Python-3.6.6 src
|
||||
cd src
|
||||
|
||||
./configure --prefix=$OUT_PREFIX --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 '{}' +
|
||||
|
||||
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build Path: /app/.heroku/python/
|
||||
# Build Deps: libraries/sqlite
|
||||
|
||||
OUT_PREFIX=$1
|
||||
|
||||
echo "Building Python…"
|
||||
SOURCE_TARBALL='https://python.org/ftp/python/3.7.0/Python-3.7.0.tgz'
|
||||
curl -L $SOURCE_TARBALL | tar xz
|
||||
mv Python-3.7.0 src
|
||||
cd src
|
||||
|
||||
./configure --prefix=$OUT_PREFIX --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 '{}' +
|
||||
|
||||
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||
@@ -12,7 +12,7 @@ testPipenvLock() {
|
||||
|
||||
testPipenvVersion() {
|
||||
compile "pipenv-version"
|
||||
assertCaptured "3.6.5"
|
||||
assertCaptured "3.6.6"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ testPython2() {
|
||||
|
||||
testPython3() {
|
||||
compile "python3"
|
||||
assertCaptured "python-3.6.5"
|
||||
assertCaptured "python-3.6.6"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user