mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69c17b343a | |||
| f31e9fa835 | |||
| 5788ff57cd | |||
| f0f3463658 | |||
| ffc7683c05 |
@@ -28,11 +28,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- TESTFOLDER=test/run-deps
|
- TESTFOLDER=test/run-deps
|
||||||
- TESTFOLDER=test/run-deps USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging
|
|
||||||
- TESTFOLDER=test/run-versions
|
- TESTFOLDER=test/run-versions
|
||||||
- TESTFOLDER=test/run-versions USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging
|
|
||||||
- TESTFOLDER=test/run-features
|
- TESTFOLDER=test/run-features
|
||||||
- TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging
|
|
||||||
global:
|
global:
|
||||||
- HATCHET_RETRIES=3
|
- HATCHET_RETRIES=3
|
||||||
- IS_RUNNING_ON_CI=true
|
- IS_RUNNING_ON_CI=true
|
||||||
|
|||||||
+5
-5
@@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
# Master
|
# Master
|
||||||
|
|
||||||
- Sqlite fix:
|
- Bug fix: fragile sqlite3 install
|
||||||
- Update Python3 and Python2 base formula
|
|
||||||
- Update Python formulas 3.6.x, 3.7.x, 3.5.x, and 2.7.17-2.7.9
|
|
||||||
- Test staged binaries on Travis
|
|
||||||
- Bug fix: Sqlite3 version bump
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# 161 (2019-12-2)
|
||||||
|
|
||||||
|
- Bug fix: Sqlite3 version bump
|
||||||
|
|
||||||
# 160 (2019-10-23)
|
# 160 (2019-10-23)
|
||||||
|
|
||||||
- Bugfix: Pipenv no longer installs twice in CI
|
- Bugfix: Pipenv no longer installs twice in CI
|
||||||
|
|||||||
+11
-33
@@ -3,21 +3,8 @@
|
|||||||
# shellcheck source=bin/utils
|
# shellcheck source=bin/utils
|
||||||
source "$BIN_DIR/utils"
|
source "$BIN_DIR/utils"
|
||||||
|
|
||||||
sqlite3_version() {
|
|
||||||
if [ "$STACK" = "cedar-14" ]; then
|
|
||||||
SQLITE3_VERSION="3.8.2-1ubuntu2.2"
|
|
||||||
elif [ "$STACK" = "heroku-16" ]; then
|
|
||||||
SQLITE3_VERSION="3.11.0-1ubuntu1.3"
|
|
||||||
else
|
|
||||||
SQLITE3_VERSION="3.22.0-1ubuntu0.2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
export SQLITE3_VERSION
|
|
||||||
}
|
|
||||||
|
|
||||||
sqlite3_install() {
|
sqlite3_install() {
|
||||||
HEROKU_PYTHON_DIR="$1"
|
HEROKU_PYTHON_DIR="$1"
|
||||||
SQLITE3_VERSION="$2"
|
|
||||||
HEADERS_ONLY="$3"
|
HEADERS_ONLY="$3"
|
||||||
|
|
||||||
mkdir -p "$HEROKU_PYTHON_DIR"
|
mkdir -p "$HEROKU_PYTHON_DIR"
|
||||||
@@ -35,9 +22,9 @@ sqlite3_install() {
|
|||||||
|
|
||||||
apt-get $APT_OPTIONS update > /dev/null 2>&1
|
apt-get $APT_OPTIONS update > /dev/null 2>&1
|
||||||
if [ -z "$HEADERS_ONLY" ]; then
|
if [ -z "$HEADERS_ONLY" ]; then
|
||||||
apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev="$SQLITE3_VERSION" sqlite3="$SQLITE3_VERSION" > /dev/null 2>&1
|
apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev sqlite3 > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev="$SQLITE3_VERSION"
|
apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find "$APT_CACHE_DIR/archives/" -name "*.deb" -exec dpkg -x {} "$HEROKU_PYTHON_DIR/sqlite3/" \;
|
find "$APT_CACHE_DIR/archives/" -name "*.deb" -exec dpkg -x {} "$HEROKU_PYTHON_DIR/sqlite3/" \;
|
||||||
@@ -70,7 +57,6 @@ sqlite3_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildpack_sqlite3_install() {
|
buildpack_sqlite3_install() {
|
||||||
sqlite3_version
|
|
||||||
HEROKU_PYTHON_DIR="$BUILD_DIR/.heroku/python"
|
HEROKU_PYTHON_DIR="$BUILD_DIR/.heroku/python"
|
||||||
|
|
||||||
SQLITE3_VERSION_FILE="$BUILD_DIR/.heroku/python-sqlite3-version"
|
SQLITE3_VERSION_FILE="$BUILD_DIR/.heroku/python-sqlite3-version"
|
||||||
@@ -78,23 +64,15 @@ buildpack_sqlite3_install() {
|
|||||||
INSTALLED_SQLITE3_VERSION=$(cat "$SQLITE3_VERSION_FILE")
|
INSTALLED_SQLITE3_VERSION=$(cat "$SQLITE3_VERSION_FILE")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# python version check
|
puts-step "Installing SQLite3"
|
||||||
if python_sqlite3_check "$PYTHON_VERSION"; then
|
|
||||||
# only install if the sqlite3 version has changed
|
|
||||||
if [ "$INSTALLED_SQLITE3_VERSION" != "$SQLITE3_VERSION" ]; then
|
|
||||||
puts-step "Installing SQLite3"
|
|
||||||
|
|
||||||
if sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION" ; then
|
if sqlite3_install "$BUILD_DIR/.heroku/python" ; then
|
||||||
echo "Sqlite3 successfully installed."
|
echo "Sqlite3 successfully installed."
|
||||||
mcount "success.python.sqlite3"
|
mcount "success.python.sqlite3"
|
||||||
else
|
else
|
||||||
echo "Sqlite3 failed to install."
|
echo "Sqlite3 failed to install."
|
||||||
mcount "failure.python.sqlite3"
|
mcount "failure.python.sqlite3"
|
||||||
fi
|
|
||||||
|
|
||||||
# save version installed
|
|
||||||
mkdir -p "$CACHE_DIR/.heroku/"
|
|
||||||
echo "$SQLITE3_VERSION" > "$CACHE_DIR/.heroku/python-sqlite3-version"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$CACHE_DIR/.heroku/"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ testSmartRequirements() {
|
|||||||
assertFile "requests" ".heroku/python/requirements-declared.txt"
|
assertFile "requests" ".heroku/python/requirements-declared.txt"
|
||||||
assertCapturedSuccess
|
assertCapturedSuccess
|
||||||
compile "psycopg2" "$cache_dir"
|
compile "psycopg2" "$cache_dir"
|
||||||
assertCaptured "Uninstalling requests"
|
|
||||||
assertFile "psycopg2" ".heroku/python/requirements-declared.txt"
|
assertFile "psycopg2" ".heroku/python/requirements-declared.txt"
|
||||||
assertCapturedSuccess
|
assertCapturedSuccess
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user