mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b6adf5223b | |||
| 0818d5428f | |||
| 1d8afb452e | |||
| 1c82d820c9 | |||
| 7cf8712d3c | |||
| 2b62692ab2 | |||
| 9188d94723 | |||
| 2ba3e06f4e | |||
| 6d78f7e3ed | |||
| 1e5ff1f8c9 | |||
| 83538ca6ec | |||
| 619bd638b0 | |||
| 5c359ba0fa | |||
| 27f019105e | |||
| eb572b5ab4 | |||
| 67c3d38a03 | |||
| 8f4ca7f624 | |||
| ce3bdb37ba | |||
| a91e9c2fc1 | |||
| da96cdf21e | |||
| 0b2e4e9b22 | |||
| 129ce5f0df | |||
| 8c654b658c | |||
| ed3691a0aa |
+33
-2
@@ -1,15 +1,46 @@
|
|||||||
# Python Buildpack Changelog
|
# Python Buildpack Changelog
|
||||||
|
|
||||||
|
## v67 (2015-10-12)
|
||||||
|
|
||||||
|
Further improved cache compatibility with multi and node.js buildpacks.
|
||||||
|
|
||||||
|
## v66 (2015-10-09)
|
||||||
|
|
||||||
|
Improved compatibility with multi and node.js buildpacks.
|
||||||
|
|
||||||
|
## v65 (2015-10-08)
|
||||||
|
|
||||||
|
Reverted v64.
|
||||||
|
|
||||||
|
## v64 (2015-10-08)
|
||||||
|
|
||||||
|
Improved compatibility with multi and node.js buildpacks.
|
||||||
|
|
||||||
|
## v63 (2015-10-08)
|
||||||
|
|
||||||
|
Updated Pip and Setuptools.
|
||||||
|
|
||||||
|
- Setuptools updated to v18.3.2
|
||||||
|
- Pip updated to v7.1.2
|
||||||
|
|
||||||
|
|
||||||
|
## v62 (2015-08-07)
|
||||||
|
|
||||||
|
Updated Pip and Setuptools.
|
||||||
|
|
||||||
|
- Setuptools updated to v18.1
|
||||||
|
- Pip updated to v7.1.0
|
||||||
|
|
||||||
## v61 (2015-06-30)
|
## v61 (2015-06-30)
|
||||||
|
|
||||||
Updated Pip and Distribute.
|
Updated Pip and Setuptools.
|
||||||
|
|
||||||
- Setuptools updated to v18.0.1
|
- Setuptools updated to v18.0.1
|
||||||
- Pip updated to v7.0.3
|
- Pip updated to v7.0.3
|
||||||
|
|
||||||
## v60 (2015-05-27)
|
## v60 (2015-05-27)
|
||||||
|
|
||||||
Default Python is now latest 2.7.10. Updated Pip and Distribute.
|
Default Python is now latest 2.7.10. Updated Pip and Distribute.
|
||||||
|
|
||||||
- Default Python version is v2.7.10
|
- Default Python version is v2.7.10
|
||||||
- Setuptools updated to v16.0
|
- Setuptools updated to v16.0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Heroku buildpack: Python
|
# Heroku buildpack: Python
|
||||||
========================
|

|
||||||
|
|
||||||
This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Python apps, powered by [pip](http://www.pip-installer.org/).
|
This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Python apps, powered by [pip](http://www.pip-installer.org/).
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Example usage:
|
|||||||
$ git push heroku master
|
$ git push heroku master
|
||||||
...
|
...
|
||||||
-----> Python app detected
|
-----> Python app detected
|
||||||
-----> Installing runtime (python-2.7.9)
|
-----> Installing runtime (python-2.7.10)
|
||||||
-----> Installing dependencies using pip
|
-----> Installing dependencies using pip
|
||||||
Downloading/unpacking requests (from -r requirements.txt (line 1))
|
Downloading/unpacking requests (from -r requirements.txt (line 1))
|
||||||
Installing collected packages: requests
|
Installing collected packages: requests
|
||||||
@@ -40,13 +40,13 @@ Specify a Runtime
|
|||||||
You can also provide arbitrary releases Python with a `runtime.txt` file.
|
You can also provide arbitrary releases Python with a `runtime.txt` file.
|
||||||
|
|
||||||
$ cat runtime.txt
|
$ cat runtime.txt
|
||||||
python-3.4.3
|
python-3.5.0
|
||||||
|
|
||||||
Runtime options include:
|
Runtime options include:
|
||||||
|
|
||||||
- python-2.7.9
|
- python-2.7.10
|
||||||
- python-3.4.3
|
- python-3.5.0
|
||||||
- pypy-2.4.0 (unsupported, experimental)
|
- pypy-2.6.1 (unsupported, experimental)
|
||||||
- pypy3-2.4.0 (unsupported, experimental)
|
- pypy3-2.4.0 (unsupported, experimental)
|
||||||
|
|
||||||
Other [unsupported runtimes](https://github.com/heroku/heroku-buildpack-python/tree/master/builds/runtimes) are available as well.
|
Other [unsupported runtimes](https://github.com/heroku/heroku-buildpack-python/tree/master/builds/runtimes) are available as well.
|
||||||
|
|||||||
+18
-14
@@ -20,19 +20,17 @@ CACHE_DIR=$2
|
|||||||
ENV_DIR=$3
|
ENV_DIR=$3
|
||||||
|
|
||||||
|
|
||||||
CACHED_DIRS=".heroku"
|
CACHE_ENTRIES=".heroku/python .heroku/python-stack .heroku/python-version .heroku/venv"
|
||||||
|
|
||||||
# Static configurations for virtualenv caches.
|
# Static configurations for virtualenv caches.
|
||||||
VIRTUALENV_LOC=".heroku/venv"
|
VIRTUALENV_LOC=".heroku/venv"
|
||||||
LEGACY_TRIGGER="lib/python2.7"
|
LEGACY_TRIGGER="lib/python2.7"
|
||||||
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
|
|
||||||
WEBCONCURRENCY_PROFILE_PATH="$BUILD_DIR/.profile.d/python.webconcurrency.sh"
|
|
||||||
|
|
||||||
DEFAULT_PYTHON_VERSION="python-2.7.10"
|
DEFAULT_PYTHON_VERSION="python-2.7.10"
|
||||||
DEFAULT_PYTHON_STACK="cedar"
|
DEFAULT_PYTHON_STACK="cedar"
|
||||||
PYTHON_EXE="/app/.heroku/python/bin/python"
|
PYTHON_EXE="/app/.heroku/python/bin/python"
|
||||||
PIP_VERSION="7.1.0"
|
PIP_VERSION="7.1.2"
|
||||||
SETUPTOOLS_VERSION="18.1"
|
SETUPTOOLS_VERSION="18.3.2"
|
||||||
|
|
||||||
# Setup bpwatch
|
# Setup bpwatch
|
||||||
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
||||||
@@ -57,10 +55,6 @@ TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
|
|||||||
|
|
||||||
bpwatch start compile
|
bpwatch start compile
|
||||||
|
|
||||||
|
|
||||||
# We'll need to send these statics to other scripts we `source`.
|
|
||||||
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
|
|
||||||
|
|
||||||
# Syntax sugar.
|
# Syntax sugar.
|
||||||
source $BIN_DIR/utils
|
source $BIN_DIR/utils
|
||||||
|
|
||||||
@@ -83,7 +77,7 @@ if [[ ! "$DOCKER_BUILD" ]]; then
|
|||||||
|
|
||||||
# Copy Application code in.
|
# Copy Application code in.
|
||||||
bpwatch start appdir_stage
|
bpwatch start appdir_stage
|
||||||
deep-mv $BUILD_DIR $APP_DIR
|
deep-cp $BUILD_DIR $APP_DIR
|
||||||
bpwatch stop appdir_stage
|
bpwatch stop appdir_stage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -92,6 +86,13 @@ fi
|
|||||||
ORIG_BUILD_DIR=$BUILD_DIR
|
ORIG_BUILD_DIR=$BUILD_DIR
|
||||||
BUILD_DIR=$APP_DIR
|
BUILD_DIR=$APP_DIR
|
||||||
|
|
||||||
|
# Set up outputs under new context
|
||||||
|
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
|
||||||
|
WEBCONCURRENCY_PROFILE_PATH="$BUILD_DIR/.profile.d/python.webconcurrency.sh"
|
||||||
|
|
||||||
|
# We'll need to send these statics to other scripts we `source`.
|
||||||
|
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
|
||||||
|
|
||||||
# Prepend proper path buildpack use.
|
# Prepend proper path buildpack use.
|
||||||
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
|
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
|
||||||
export PYTHONUNBUFFERED=1
|
export PYTHONUNBUFFERED=1
|
||||||
@@ -144,8 +145,9 @@ bpwatch stop clear_old_venvs
|
|||||||
|
|
||||||
# Restore old artifacts from the cache.
|
# Restore old artifacts from the cache.
|
||||||
bpwatch start restore_cache
|
bpwatch start restore_cache
|
||||||
for dir in $CACHED_DIRS; do
|
for dir in $CACHE_ENTRIES; do
|
||||||
cp -R $CACHE_DIR/$dir . &> /dev/null || true
|
mkdir -p $(basename $dir)
|
||||||
|
cp -R $CACHE_DIR/$dir $dir &> /dev/null || true
|
||||||
done
|
done
|
||||||
bpwatch stop restore_cache
|
bpwatch stop restore_cache
|
||||||
|
|
||||||
@@ -208,9 +210,10 @@ bpwatch stop post_compile
|
|||||||
|
|
||||||
# Store new artifacts in cache.
|
# Store new artifacts in cache.
|
||||||
bpwatch start dump_cache
|
bpwatch start dump_cache
|
||||||
for dir in $CACHED_DIRS; do
|
for dir in $CACHE_ENTRIES; do
|
||||||
rm -rf $CACHE_DIR/$dir
|
rm -rf $CACHE_DIR/$dir
|
||||||
cp -R $dir $CACHE_DIR/
|
mkdir -p $(dirname $CACHE_DIR/$dir)
|
||||||
|
cp -R $dir $CACHE_DIR/$dir
|
||||||
done
|
done
|
||||||
bpwatch stop dump_cache
|
bpwatch stop dump_cache
|
||||||
|
|
||||||
@@ -218,6 +221,7 @@ bpwatch stop dump_cache
|
|||||||
if [[ ! "$DOCKER_BUILD" ]]; then
|
if [[ ! "$DOCKER_BUILD" ]]; then
|
||||||
|
|
||||||
bpwatch start appdir_commit
|
bpwatch start appdir_commit
|
||||||
|
deep-rm $ORIG_BUILD_DIR
|
||||||
deep-mv $BUILD_DIR $ORIG_BUILD_DIR
|
deep-mv $BUILD_DIR $ORIG_BUILD_DIR
|
||||||
bpwatch stop appdir_commit
|
bpwatch stop appdir_commit
|
||||||
|
|
||||||
|
|||||||
Executable
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Build Path: /app/.heroku/python/
|
||||||
|
# Build Deps: libraries/sqlite
|
||||||
|
|
||||||
|
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
|
||||||
|
|
||||||
|
OUT_PREFIX=$1
|
||||||
|
|
||||||
|
echo "Building PyPy..."
|
||||||
|
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux64.tar.bz2'
|
||||||
|
curl -L $SOURCE_TARBALL | tar jx
|
||||||
|
cp -R pypy-2.6.1-linux64/* $OUT_PREFIX
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/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.5.0/Python-3.5.0.tgz'
|
||||||
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
|
mv Python-3.5.0 src
|
||||||
|
cd src
|
||||||
|
|
||||||
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
|
||||||
|
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
|
||||||
|
|
||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Reference in New Issue
Block a user