mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96ffc147d4 | |||
| 4063e9d22e | |||
| 751413168b | |||
| 527ea604c8 | |||
| 302c2f0432 | |||
| 14c7e26f7a | |||
| 58e664a9e3 | |||
| e965516197 | |||
| 8775cb821c | |||
| 9dcabe24a5 | |||
| 38f9a41a54 |
@@ -19,10 +19,6 @@ jobs:
|
|||||||
services: docker
|
services: docker
|
||||||
env: STACK=heroku-16
|
env: STACK=heroku-16
|
||||||
script: "./tests.sh"
|
script: "./tests.sh"
|
||||||
- stage: Stack Unit Tests
|
|
||||||
services: docker
|
|
||||||
env: STACK=cedar-14
|
|
||||||
script: "./tests.sh"
|
|
||||||
- stage: Hatchet Integration
|
- stage: Hatchet Integration
|
||||||
script: "bundle exec rspec"
|
script: "bundle exec rspec"
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# Python Buildpack Changelog
|
# Python Buildpack Changelog
|
||||||
|
|
||||||
|
# 154 (2019-07-17)
|
||||||
|
|
||||||
|
Fix python 3.5.7 formula actually building 3.7.2
|
||||||
|
|
||||||
|
# 153 (2019-06-21)
|
||||||
|
|
||||||
|
Hotfix for broken heroku-16 deploys
|
||||||
|
|
||||||
# 152 (2019-04-04)
|
# 152 (2019-04-04)
|
||||||
|
|
||||||
Python 3.7.3 now available.
|
Python 3.7.3 now available.
|
||||||
|
|||||||
+2
-1
@@ -3,7 +3,8 @@ FROM heroku/heroku:16-build
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV WORKSPACE_DIR="/app/builds" \
|
ENV WORKSPACE_DIR="/app/builds" \
|
||||||
S3_BUCKET="lang-python" \
|
S3_BUCKET="lang-python" \
|
||||||
S3_PREFIX="heroku-16/"
|
S3_PREFIX="heroku-16/" \
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ FROM heroku/heroku:18-build
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV WORKSPACE_DIR="/app/builds" \
|
ENV WORKSPACE_DIR="/app/builds" \
|
||||||
S3_BUCKET="lang-python" \
|
S3_BUCKET="lang-python" \
|
||||||
S3_PREFIX="heroku-18/"
|
S3_PREFIX="heroku-18/" \
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y python-pip && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,6 @@ check:
|
|||||||
@shellcheck -x bin/steps/collectstatic bin/steps/eggpath-fix bin/steps/eggpath-fix2 bin/steps/gdal bin/steps/geo-libs bin/steps/mercurial bin/steps/nltk bin/steps/pip-install bin/steps/pip-uninstall bin/steps/pipenv bin/steps/pipenv-python-version bin/steps/pylibmc bin/steps/python
|
@shellcheck -x bin/steps/collectstatic bin/steps/eggpath-fix bin/steps/eggpath-fix2 bin/steps/gdal bin/steps/geo-libs bin/steps/mercurial bin/steps/nltk bin/steps/pip-install bin/steps/pip-uninstall bin/steps/pipenv bin/steps/pipenv-python-version bin/steps/pylibmc bin/steps/python
|
||||||
@shellcheck -x bin/steps/hooks/*
|
@shellcheck -x bin/steps/hooks/*
|
||||||
|
|
||||||
test-cedar-14:
|
|
||||||
@echo "Running tests in docker (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;'
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
test-heroku-16:
|
test-heroku-16:
|
||||||
@echo "Running tests in docker (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;'
|
@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;'
|
||||||
@@ -36,6 +31,19 @@ buildenv-heroku-16:
|
|||||||
@echo
|
@echo
|
||||||
@docker run -it --rm python-buildenv-heroku-16
|
@docker run -it --rm python-buildenv-heroku-16
|
||||||
|
|
||||||
|
buildenv-heroku-18:
|
||||||
|
@echo "Creating build environment (heroku-18)..."
|
||||||
|
@echo
|
||||||
|
@docker build --pull -f Dockerfile.heroku-18 -t python-buildenv-heroku-18 .
|
||||||
|
@echo
|
||||||
|
@echo "Usage..."
|
||||||
|
@echo
|
||||||
|
@echo " $$ export AWS_ACCESS_KEY_ID=foo AWS_SECRET_ACCESS_KEY=bar # Optional unless deploying"
|
||||||
|
@echo " $$ bob build runtimes/python-2.7.13"
|
||||||
|
@echo " $$ bob deploy runtimes/python-2.7.13"
|
||||||
|
@echo
|
||||||
|
@docker run -it --rm python-buildenv-heroku-18
|
||||||
|
|
||||||
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/
|
||||||
|
|||||||
Regular → Executable
+2
@@ -6,6 +6,8 @@ source "$BIN_DIR/utils"
|
|||||||
sqlite3_version() {
|
sqlite3_version() {
|
||||||
if [ "$STACK" = "cedar-14" ]; then
|
if [ "$STACK" = "cedar-14" ]; then
|
||||||
SQLITE3_VERSION="3.8.2-1ubuntu2.2"
|
SQLITE3_VERSION="3.8.2-1ubuntu2.2"
|
||||||
|
elif [ "$STACK" = "heroku-16" ]; then
|
||||||
|
SQLITE3_VERSION="3.11.0-1ubuntu1.2"
|
||||||
else
|
else
|
||||||
SQLITE3_VERSION=${SQLITE3_VERSION:-$(dpkg -s libsqlite3-0 | grep Version | sed 's/Version: //')}
|
SQLITE3_VERSION=${SQLITE3_VERSION:-$(dpkg -s libsqlite3-0 | grep Version | sed 's/Version: //')}
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -37,5 +37,11 @@ For Heroku-16 stack
|
|||||||
2. From the root of the buildpack repository, run: `make buildenv-heroku-16`
|
2. From the root of the buildpack repository, run: `make buildenv-heroku-16`
|
||||||
3. Follow the instructions displayed!
|
3. Follow the instructions displayed!
|
||||||
|
|
||||||
|
For Heroku-18 stack
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
1. Ensure GNU Make and Docker are installed.
|
||||||
|
2. From the root of the buildpack repository, run: `make buildenv-heroku-18`
|
||||||
|
3. Follow the instructions displayed!
|
||||||
|
|
||||||
Enjoy :)
|
Enjoy :)
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ echo "Setting up SQLite3 Headers for $SQLITE3_VERSION"
|
|||||||
sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1
|
sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1
|
||||||
|
|
||||||
echo "Building Python…"
|
echo "Building Python…"
|
||||||
SOURCE_TARBALL='https://python.org/ftp/python/3.7.2/Python-3.7.2.tgz'
|
SOURCE_TARBALL='https://python.org/ftp/python/3.5.7/Python-3.5.7.tgz'
|
||||||
curl -L $SOURCE_TARBALL | tar xz
|
curl -L $SOURCE_TARBALL | tar xz
|
||||||
mv Python-3.7.2 src
|
mv Python-3.5.7 src
|
||||||
cd src
|
cd src
|
||||||
|
|
||||||
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
|
./configure --prefix=$OUT_PREFIX --with-ensurepip=no
|
||||||
|
|||||||
Reference in New Issue
Block a user