mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 65648fb7a8 | |||
| 45b0d18532 | |||
| 8f258ae0b8 | |||
| b80f7a953f | |||
| f27a84e015 | |||
| 5794bacbbf | |||
| e29b60dcfd | |||
| 7c95b156ce | |||
| e05346e8c1 | |||
| 9deea01360 | |||
| c19f0f83ee | |||
| 8b88d655c4 | |||
| 0e8c0077ff | |||
| cfda557b31 | |||
| 44c2b75b8d | |||
| c3849fb6d3 | |||
| 5608ed9f3c | |||
| e9108858fc | |||
| c85f5d015c | |||
| 321543d4ae | |||
| 8bd209de13 | |||
| 58e9c84347 | |||
| dcfff15151 | |||
| 9426dc8668 | |||
| cdbeb6419e | |||
| 858113cf76 | |||
| a547da0b52 | |||
| df52fd46e5 | |||
| 2e37a96984 | |||
| 12c3b8cb1d | |||
| 0fadebf7d8 | |||
| 33ccaa9e45 | |||
| 6b5ec50ab9 | |||
| 63810f29d3 | |||
| 0de749a6a2 | |||
| 2df1131d3c | |||
| af0795264b | |||
| 327daa5f32 | |||
| 09b7e44841 | |||
| e26a0f04d9 | |||
| c92f379f78 | |||
| 893bdec066 | |||
| 607dcfda07 | |||
| 26a0b9678f | |||
| e58e5d2b74 | |||
| 6faa5a4efc | |||
| 2881d65e4e | |||
| 1696e7cee6 | |||
| 35b89386ed | |||
| 3634eb1dbf | |||
| 66f5a66740 | |||
| 6e2a504fc1 | |||
| 124aff5ea6 | |||
| c44ab4cd03 | |||
| d1ab87748b | |||
| 6844d1252d | |||
| 1346c29089 | |||
| 3bc1b5e697 |
@@ -1,2 +1,3 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
site
|
site
|
||||||
|
.DS_Store
|
||||||
|
|||||||
+5
-2
@@ -2,5 +2,8 @@ language: bash
|
|||||||
sudo: required
|
sudo: required
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
install: docker pull heroku/cedar:14
|
# install: docker pull heroku/cedar:14
|
||||||
script: make test
|
script: ./tests.sh
|
||||||
|
env:
|
||||||
|
- STACK=heroku-16
|
||||||
|
- STACK=cedar-14
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
# Python Buildpack Changelog
|
# Python Buildpack Changelog
|
||||||
|
|
||||||
|
## 100
|
||||||
|
|
||||||
|
Preliminary pipenv support.
|
||||||
|
|
||||||
|
## 99
|
||||||
|
|
||||||
|
Cleanup.
|
||||||
|
|
||||||
## 98
|
## 98
|
||||||
|
|
||||||
Official NLTK support and other improvements.
|
Official NLTK support and other improvements.
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ test-cedar-14:
|
|||||||
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=cedar-14" heroku/cedar:14 bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
|
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=cedar-14" heroku/cedar:14 bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
||||||
|
test-heroku-16:
|
||||||
|
@echo "Running tests in docker (heroku-16)..."
|
||||||
|
@docker run -v $(shell pwd):/buildpack:ro --rm -it -e "STACK=heroku-16" heroku/heroku:16-build bash -c 'cp -r /buildpack /buildpack_test; cd /buildpack_test/; test/run;'
|
||||||
|
@echo ""
|
||||||
|
|
||||||
tools:
|
tools:
|
||||||
git clone https://github.com/kennethreitz/pip-pop.git
|
git clone https://github.com/kennethreitz/pip-pop.git
|
||||||
mv pip-pop/bin/* vendor/pip-pop/
|
mv pip-pop/bin/* vendor/pip-pop/
|
||||||
|
|||||||
+20
-32
@@ -27,10 +27,7 @@ BUILD_DIR=$1
|
|||||||
CACHE_DIR=$2
|
CACHE_DIR=$2
|
||||||
ENV_DIR=$3
|
ENV_DIR=$3
|
||||||
|
|
||||||
# Static configurations for virtualenv caches.
|
# Python defaults
|
||||||
VIRTUALENV_LOC=".heroku/venv"
|
|
||||||
LEGACY_TRIGGER="lib/python2.7"
|
|
||||||
|
|
||||||
DEFAULT_PYTHON_VERSION="python-2.7.13"
|
DEFAULT_PYTHON_VERSION="python-2.7.13"
|
||||||
DEFAULT_PYTHON_STACK="cedar-14"
|
DEFAULT_PYTHON_STACK="cedar-14"
|
||||||
PYTHON_EXE="/app/.heroku/python/bin/python"
|
PYTHON_EXE="/app/.heroku/python/bin/python"
|
||||||
@@ -42,7 +39,7 @@ export WARNINGS_LOG=$(mktemp)
|
|||||||
export RECOMMENDED_PYTHON_VERSION=$DEFAULT_PYTHON_VERSION
|
export RECOMMENDED_PYTHON_VERSION=$DEFAULT_PYTHON_VERSION
|
||||||
|
|
||||||
# Setup bpwatch
|
# Setup bpwatch
|
||||||
export PATH=$PATH:$ROOT_DIR/vendor/bpwatch
|
export PATH=$PATH:$ROOT_DIR/vendor/:$ROOT_DIR/vendor/bpwatch
|
||||||
LOGPLEX_KEY="t.b90d9d29-5388-4908-9737-b4576af1d4ce"
|
LOGPLEX_KEY="t.b90d9d29-5388-4908-9737-b4576af1d4ce"
|
||||||
export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json
|
export BPWATCH_STORE_PATH=$CACHE_DIR/bpwatch.json
|
||||||
BUILDPACK_VERSION=v28
|
BUILDPACK_VERSION=v28
|
||||||
@@ -107,12 +104,6 @@ bpwatch start pre_compile
|
|||||||
source $BIN_DIR/steps/hooks/pre_compile
|
source $BIN_DIR/steps/hooks/pre_compile
|
||||||
bpwatch stop pre_compile
|
bpwatch stop pre_compile
|
||||||
|
|
||||||
# If no requirements.txt file given, assume `setup.py develop` is intended.
|
|
||||||
if [ ! -f requirements.txt ]; then
|
|
||||||
echo "-e ." > requirements.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Sticky runtimes.
|
# Sticky runtimes.
|
||||||
if [ -f $CACHE_DIR/.heroku/python-version ]; then
|
if [ -f $CACHE_DIR/.heroku/python-version ]; then
|
||||||
DEFAULT_PYTHON_VERSION=$(cat $CACHE_DIR/.heroku/python-version)
|
DEFAULT_PYTHON_VERSION=$(cat $CACHE_DIR/.heroku/python-version)
|
||||||
@@ -125,6 +116,9 @@ else
|
|||||||
CACHED_PYTHON_STACK=$STACK
|
CACHED_PYTHON_STACK=$STACK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Pipenv Python version support.
|
||||||
|
source $BIN_DIR/steps/pipenv-python-version
|
||||||
|
|
||||||
# If no runtime given, assume default version.
|
# If no runtime given, assume default version.
|
||||||
if [ ! -f runtime.txt ]; then
|
if [ ! -f runtime.txt ]; then
|
||||||
echo $DEFAULT_PYTHON_VERSION > runtime.txt
|
echo $DEFAULT_PYTHON_VERSION > runtime.txt
|
||||||
@@ -133,12 +127,6 @@ fi
|
|||||||
# Prepare the cache.
|
# Prepare the cache.
|
||||||
mkdir -p $CACHE_DIR
|
mkdir -p $CACHE_DIR
|
||||||
|
|
||||||
# Purge "old-style" virtualenvs.
|
|
||||||
bpwatch start clear_old_venvs
|
|
||||||
[ -d $CACHE_DIR/$LEGACY_TRIGGER ] && rm -fr $CACHE_DIR/.heroku/bin $CACHE_DIR/.heroku/lib $CACHE_DIR/.heroku/include
|
|
||||||
[ -d $CACHE_DIR/$VIRTUALENV_LOC ] && rm -fr $CACHE_DIR/.heroku/venv $CACHE_DIR/.heroku/src
|
|
||||||
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
|
||||||
mkdir -p .heroku
|
mkdir -p .heroku
|
||||||
@@ -147,7 +135,6 @@ bpwatch start restore_cache
|
|||||||
cp -R $CACHE_DIR/.heroku/python-stack .heroku/ &> /dev/null || true
|
cp -R $CACHE_DIR/.heroku/python-stack .heroku/ &> /dev/null || true
|
||||||
cp -R $CACHE_DIR/.heroku/python-version .heroku/ &> /dev/null || true
|
cp -R $CACHE_DIR/.heroku/python-version .heroku/ &> /dev/null || true
|
||||||
cp -R $CACHE_DIR/.heroku/vendor .heroku/ &> /dev/null || true
|
cp -R $CACHE_DIR/.heroku/vendor .heroku/ &> /dev/null || true
|
||||||
cp -R $CACHE_DIR/.heroku/venv .heroku/ &> /dev/null || true
|
|
||||||
if [[ -d $CACHE_DIR/.heroku/src ]]; then
|
if [[ -d $CACHE_DIR/.heroku/src ]]; then
|
||||||
cp -R $CACHE_DIR/.heroku/src .heroku/ &> /dev/null || true
|
cp -R $CACHE_DIR/.heroku/src .heroku/ &> /dev/null || true
|
||||||
fi
|
fi
|
||||||
@@ -162,7 +149,6 @@ if [[ $BUILD_DIR != '/app' ]]; then
|
|||||||
# we will not remove these later so subsequent buildpacks can still invoke it
|
# we will not remove these later so subsequent buildpacks can still invoke it
|
||||||
ln -nsf $BUILD_DIR/.heroku/python /app/.heroku/python
|
ln -nsf $BUILD_DIR/.heroku/python /app/.heroku/python
|
||||||
ln -nsf $BUILD_DIR/.heroku/vendor /app/.heroku/vendor
|
ln -nsf $BUILD_DIR/.heroku/vendor /app/.heroku/vendor
|
||||||
ln -nsf $BUILD_DIR/.heroku/venv /app/.heroku/venv
|
|
||||||
# Note: .heroku/src is copied in later.
|
# Note: .heroku/src is copied in later.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -172,8 +158,16 @@ source $BIN_DIR/steps/python
|
|||||||
# Sanity check for setuptools/distribute.
|
# Sanity check for setuptools/distribute.
|
||||||
source $BIN_DIR/steps/setuptools
|
source $BIN_DIR/steps/setuptools
|
||||||
|
|
||||||
# Uninstall removed dependencies with Pip.
|
# Pipenv support.
|
||||||
source $BIN_DIR/steps/pip-uninstall
|
source $BIN_DIR/steps/pipenv
|
||||||
|
|
||||||
|
# If no requirements.txt file given, assume `setup.py develop` is intended.
|
||||||
|
if [ ! -f requirements.txt ] && [ ! -f Pipfile ]; then
|
||||||
|
echo "-e ." > requirements.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fix egg-links.
|
||||||
|
source $BIN_DIR/steps/eggpath-fix
|
||||||
|
|
||||||
# Mercurial support.
|
# Mercurial support.
|
||||||
source $BIN_DIR/steps/mercurial
|
source $BIN_DIR/steps/mercurial
|
||||||
@@ -193,6 +187,9 @@ source $BIN_DIR/steps/gdal
|
|||||||
# Install dependencies with Pip (where the magic happens).
|
# Install dependencies with Pip (where the magic happens).
|
||||||
source $BIN_DIR/steps/pip-install
|
source $BIN_DIR/steps/pip-install
|
||||||
|
|
||||||
|
# Uninstall removed dependencies with Pip.
|
||||||
|
source $BIN_DIR/steps/pip-uninstall
|
||||||
|
|
||||||
# Support for NLTK corpora.
|
# Support for NLTK corpora.
|
||||||
sub-env $BIN_DIR/steps/nltk
|
sub-env $BIN_DIR/steps/nltk
|
||||||
|
|
||||||
@@ -221,15 +218,8 @@ bpwatch start post_compile
|
|||||||
source $BIN_DIR/steps/hooks/post_compile
|
source $BIN_DIR/steps/hooks/post_compile
|
||||||
bpwatch stop post_compile
|
bpwatch stop post_compile
|
||||||
|
|
||||||
set +e
|
# Fix egg-links, again.
|
||||||
# rewrite build dir in egg links to /app so things are found at runtime
|
source $BIN_DIR/steps/eggpath-fix2
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null
|
|
||||||
set -e
|
|
||||||
|
|
||||||
set +e
|
|
||||||
# Support for PyPy
|
|
||||||
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Store new artifacts in cache.
|
# Store new artifacts in cache.
|
||||||
bpwatch start dump_cache
|
bpwatch start dump_cache
|
||||||
@@ -238,7 +228,6 @@ bpwatch start dump_cache
|
|||||||
rm -rf $CACHE_DIR/.heroku/python-version
|
rm -rf $CACHE_DIR/.heroku/python-version
|
||||||
rm -rf $CACHE_DIR/.heroku/python-stack
|
rm -rf $CACHE_DIR/.heroku/python-stack
|
||||||
rm -rf $CACHE_DIR/.heroku/vendor
|
rm -rf $CACHE_DIR/.heroku/vendor
|
||||||
rm -rf $CACHE_DIR/.heroku/venv
|
|
||||||
rm -rf $CACHE_DIR/.heroku/src
|
rm -rf $CACHE_DIR/.heroku/src
|
||||||
|
|
||||||
mkdir -p $CACHE_DIR/.heroku
|
mkdir -p $CACHE_DIR/.heroku
|
||||||
@@ -246,7 +235,6 @@ bpwatch start dump_cache
|
|||||||
cp -R .heroku/python-version $CACHE_DIR/.heroku/
|
cp -R .heroku/python-version $CACHE_DIR/.heroku/
|
||||||
cp -R .heroku/python-stack $CACHE_DIR/.heroku/ &> /dev/null || true
|
cp -R .heroku/python-stack $CACHE_DIR/.heroku/ &> /dev/null || true
|
||||||
cp -R .heroku/vendor $CACHE_DIR/.heroku/ &> /dev/null || true
|
cp -R .heroku/vendor $CACHE_DIR/.heroku/ &> /dev/null || true
|
||||||
cp -R .heroku/venv $CACHE_DIR/.heroku/ &> /dev/null || true
|
|
||||||
if [[ -d .heroku/src ]]; then
|
if [[ -d .heroku/src ]]; then
|
||||||
cp -R .heroku/src $CACHE_DIR/.heroku/ &> /dev/null || true
|
cp -R .heroku/src $CACHE_DIR/.heroku/ &> /dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
BUILD_DIR=$1
|
BUILD_DIR=$1
|
||||||
|
|
||||||
# Exit early if app is clearly not Python.
|
# Exit early if app is clearly not Python.
|
||||||
if [ ! -f $BUILD_DIR/requirements.txt ] && [ ! -f $BUILD_DIR/setup.py ]; then
|
if [ ! -f $BUILD_DIR/requirements.txt ] && [ ! -f $BUILD_DIR/setup.py ] && [ ! -f $BUILD_DIR/Pipfile ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
set +e
|
||||||
|
# delete any existing egg links, to uninstall exisisting installations.
|
||||||
|
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -delete 2> /dev/null
|
||||||
|
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set +e
|
||||||
|
# Support for the above, for PyPy.
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#" &> /dev/null
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
|
||||||
|
set -e
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
set +e
|
||||||
|
# rewrite build dir in egg links to /app so things are found at runtime
|
||||||
|
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null
|
||||||
|
set -e
|
||||||
|
|
||||||
|
set +e
|
||||||
|
# Support for PyPy
|
||||||
|
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null
|
||||||
|
set -e
|
||||||
@@ -27,8 +27,6 @@ if [ $? -eq 0 ]; then
|
|||||||
else
|
else
|
||||||
puts-warn "nltk.txt not found, not downloading any corpora"
|
puts-warn "nltk.txt not found, not downloading any corpora"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
puts-warn "nltk not apparently installed, not downloading packages"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-13
@@ -1,17 +1,5 @@
|
|||||||
# Install dependencies with Pip.
|
# Install dependencies with Pip.
|
||||||
puts-cmd "pip install -r requirements.txt"
|
puts-step "Installing requirements with pip"
|
||||||
|
|
||||||
set +e
|
|
||||||
# delete any existing egg links, to uninstall exisisting installations.
|
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -delete 2> /dev/null
|
|
||||||
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
|
|
||||||
set -e
|
|
||||||
|
|
||||||
set +e
|
|
||||||
# Support for the above, for PyPy.
|
|
||||||
find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#" &> /dev/null
|
|
||||||
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
|
|
||||||
set -e
|
|
||||||
|
|
||||||
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
|
||||||
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Pipenv support (Generate requriements.txt with pipenv).
|
||||||
|
if [[ -f Pipfile ]]; then
|
||||||
|
if [[ ! -f requirements.txt ]]; then
|
||||||
|
puts-step "Generating 'requirements.txt' with pipenv"
|
||||||
|
|
||||||
|
/app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
|
||||||
|
|
||||||
|
/app/.heroku/python/bin/pipenv lock --requirements --no-hashes > $BUILD_DIR/requirements.txt 2> /dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
Executable
+23
@@ -0,0 +1,23 @@
|
|||||||
|
# Detect Python-version with Pipenv.
|
||||||
|
|
||||||
|
if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
|
||||||
|
|
||||||
|
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
|
||||||
|
if [[ ! -f $BUILD_DIR/Pipfile.lock ]]; then
|
||||||
|
puts-warn "No 'pipfile.lock' found! We recommend you commit this into your repository."
|
||||||
|
fi
|
||||||
|
if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
|
||||||
|
set +e
|
||||||
|
PYTHON=$(cat $BUILD_DIR/Pipfile.lock | jq '._meta.requires.python_version' -r)
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$PYTHON" = 2.7 ]; then
|
||||||
|
echo "python-2.7.13" > $BUILD_DIR/runtime.txt
|
||||||
|
fi
|
||||||
|
if [ "$PYTHON" = 3.6 ]; then
|
||||||
|
echo "python-3.6.0" > $BUILD_DIR/runtime.txt
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
+7
-15
@@ -1,4 +1,5 @@
|
|||||||
set +e
|
set +e
|
||||||
|
runtime-fixer runtime.txt
|
||||||
PYTHON_VERSION=$(cat runtime.txt)
|
PYTHON_VERSION=$(cat runtime.txt)
|
||||||
|
|
||||||
# Install Python.
|
# Install Python.
|
||||||
@@ -54,23 +55,14 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then
|
|||||||
TMPTARDIR=$(mktemp -d)
|
TMPTARDIR=$(mktemp -d)
|
||||||
trap "rm -rf $TMPTARDIR" RETURN
|
trap "rm -rf $TMPTARDIR" RETURN
|
||||||
|
|
||||||
bpwatch start install_setuptools
|
puts-step "Installing pip"
|
||||||
# Prepare it for the real world
|
|
||||||
# puts-step "Installing Setuptools ($SETUPTOOLS_VERSION)"
|
|
||||||
tar zxf $ROOT_DIR/vendor/setuptools-$SETUPTOOLS_VERSION.tar.gz -C $TMPTARDIR
|
|
||||||
cd $TMPTARDIR/setuptools-$SETUPTOOLS_VERSION/
|
|
||||||
python setup.py install &> /dev/null
|
|
||||||
cd $WORKING_DIR
|
|
||||||
bpwatch stop install_setuptoools
|
|
||||||
|
|
||||||
bpwatch start install_pip
|
# Remove old installations.
|
||||||
# puts-step "Installing Pip ($PIP_VERSION)"
|
rm -fr /app/.heroku/python/lib/python2.7/site-packages/pip-*
|
||||||
tar zxf $ROOT_DIR/vendor/pip-$PIP_VERSION.tar.gz -C $TMPTARDIR
|
rm -fr /app/.heroku/python/lib/python2.7/site-packages/setuptools-*
|
||||||
cd $TMPTARDIR/pip-$PIP_VERSION/
|
|
||||||
python setup.py install &> /dev/null
|
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pip.py &> /dev/null
|
||||||
cd $WORKING_DIR
|
|
||||||
|
|
||||||
bpwatch stop install_pip
|
|
||||||
bpwatch stop prepare_environment
|
bpwatch stop prepare_environment
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -15,7 +15,7 @@ SOURCE_TARBALL='http://download.osgeo.org/gdal/1.11.1/gdal-1.11.1.tar.gz'
|
|||||||
curl -L $SOURCE_TARBALL | tar zx
|
curl -L $SOURCE_TARBALL | tar zx
|
||||||
|
|
||||||
cd gdal-1.11.1
|
cd gdal-1.11.1
|
||||||
./configure --prefix=$OUT_PREFIX &&
|
./configure --prefix=$OUT_PREFIX --enable-static=no &&
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
-3
@@ -10,12 +10,12 @@ hash -r
|
|||||||
|
|
||||||
echo "Building geos..."
|
echo "Building geos..."
|
||||||
|
|
||||||
SOURCE_TARBALL='http://download.osgeo.org/geos/geos-3.4.2.tar.bz2'
|
SOURCE_TARBALL='http://download.osgeo.org/geos/geos-3.4.3.tar.bz2'
|
||||||
|
|
||||||
curl -L $SOURCE_TARBALL | tar xj
|
curl -L $SOURCE_TARBALL | tar xj
|
||||||
|
|
||||||
cd geos-3.4.2
|
cd geos-3.4.3
|
||||||
./configure --prefix=$OUT_PREFIX &&
|
./configure --prefix=$OUT_PREFIX --enable-static=no &&
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -15,7 +15,7 @@ SOURCE_TARBALL='http://download.osgeo.org/proj/proj-4.8.0.tar.gz'
|
|||||||
curl -L $SOURCE_TARBALL | tar zx
|
curl -L $SOURCE_TARBALL | tar zx
|
||||||
|
|
||||||
cd proj-4.8.0
|
cd proj-4.8.0
|
||||||
./configure --prefix=$OUT_PREFIX &&
|
./configure --prefix=$OUT_PREFIX --enable-static=no &&
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
wordnet
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
nltk
|
||||||
Vendored
+9
@@ -0,0 +1,9 @@
|
|||||||
|
[[source]]
|
||||||
|
url = "https://pypi.python.org/simple"
|
||||||
|
verify_ssl = true
|
||||||
|
|
||||||
|
[packages]
|
||||||
|
requests = "*"
|
||||||
|
|
||||||
|
[requires]
|
||||||
|
python_version = "3.6"
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"default": {
|
||||||
|
"requests": {
|
||||||
|
"version": "==2.13.0",
|
||||||
|
"hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"develop": {},
|
||||||
|
"_meta": {
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"url": "https://pypi.python.org/simple",
|
||||||
|
"verify_ssl": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"requires": {
|
||||||
|
"python_version": "3.6"
|
||||||
|
},
|
||||||
|
"hash": {
|
||||||
|
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
[packages]
|
||||||
|
"delegator.py" = "*"
|
||||||
@@ -1,11 +1,30 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
|
testPipenv() {
|
||||||
|
compile "pipenv"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
testPipenvVersion() {
|
||||||
|
compile "pipenv-version"
|
||||||
|
assertCaptured "3.6.0"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
testNoRequirements() {
|
testNoRequirements() {
|
||||||
compile "no-requirements"
|
compile "no-requirements"
|
||||||
assertCapturedError
|
assertCapturedError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
testNLTK() {
|
||||||
|
compile "nltk"
|
||||||
|
assertCaptured "wordnet"
|
||||||
|
assertCapturedSuccess
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
testSetupPy() {
|
testSetupPy() {
|
||||||
compile "setup-py"
|
compile "setup-py"
|
||||||
assertCaptured "maya"
|
assertCaptured "maya"
|
||||||
|
|||||||
@@ -150,6 +150,8 @@ _assertContains()
|
|||||||
debug()
|
debug()
|
||||||
{
|
{
|
||||||
cat $STD_OUT
|
cat $STD_OUT
|
||||||
|
echo '^^^^^^'
|
||||||
|
cat $STD_ERR
|
||||||
}
|
}
|
||||||
|
|
||||||
assertContains()
|
assertContains()
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ ! "$STACK" ]]; then
|
||||||
|
echo '$STACK must be set! (heroku-16 | cedar-14)'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$STACK" == "cedar-14" ]]; then
|
||||||
|
make test-cedar-14
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$STACK" == "heroku-16" ]]; then
|
||||||
|
make test-heroku-16
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
Vendored
+20061
File diff suppressed because it is too large
Load Diff
Vendored
BIN
Binary file not shown.
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
runtime_file = sys.argv[1]
|
||||||
|
|
||||||
|
with open(runtime_file, 'r') as f:
|
||||||
|
r = f.read().strip()
|
||||||
|
|
||||||
|
with open(runtime_file, 'w') as f:
|
||||||
|
f.write(r)
|
||||||
Reference in New Issue
Block a user