From 35873ee517c75fbda48439cc0d032a103f370d91 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 11:14:36 -0700 Subject: [PATCH 01/37] update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76e6fd3..17c2511 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Master +- Test staged binaries on Travis + -------------------------------------------------------------------------------- # 156 (2019-09-12) From 6a8aa1e2b03e814d5e0b2fd5280a25674ebc5918 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 11:15:09 -0700 Subject: [PATCH 02/37] update travis matrix to change vendor url --- .travis.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5449a3..b6d220d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,11 +25,20 @@ jobs: if: branch = master name: Run Hatchet script: "bundle exec rspec" + +matrix: + include: + - env: TESTFOLDER=test/run-deps + - env: TESTFOLDER=test/run-deps + VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - env: TESTFOLDER=test/run-versions + - env: TESTFOLDER=test/run-versions + VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - env: TESTFOLDER=test/run-features + - env: TESTFOLDER=test/run-features + VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + env: - matrix: - - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-features global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From 7c82017a0e1ef668b059664f1b39ff2fcc33878b Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 13:19:38 -0700 Subject: [PATCH 03/37] run each matrix item twice, with VENDOR_URL update --- .travis.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6d220d..961ba73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,20 +25,14 @@ jobs: if: branch = master name: Run Hatchet script: "bundle exec rspec" - -matrix: - include: - - env: TESTFOLDER=test/run-deps - - env: TESTFOLDER=test/run-deps - VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - - env: TESTFOLDER=test/run-versions - - env: TESTFOLDER=test/run-versions - VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - - env: TESTFOLDER=test/run-features - - env: TESTFOLDER=test/run-features - VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - env: + matrix: + - TESTFOLDER=test/run-deps + - TESTFOLDER=test/run-deps VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-versions + - TESTFOLDER=test/run-versions VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-features + - TESTFOLDER=test/run-features VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From 74bc1d40496fa3b1d5b9b2b260a0700449eee028 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 15:22:29 -0700 Subject: [PATCH 04/37] pass vendor url to docker container --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 961ba73..f545c75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "VENDOR_URL=$VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER jobs: include: From ce6657d5feb401b254a48544f8c82e57507d66e0 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 8 Oct 2019 09:54:17 -0700 Subject: [PATCH 05/37] use correct override var BUILDPACK_VENDOR_URL instead of vendor_url --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f545c75..9d7fae6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" -e "VENDOR_URL=$VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" -e "VENDOR_URL=$VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER jobs: include: @@ -28,11 +28,11 @@ jobs: env: matrix: - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-deps VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-deps BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-versions VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-versions BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK - TESTFOLDER=test/run-features - - TESTFOLDER=test/run-features VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-features BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From 03c12e808155cb150921cce2eced57a3f5224793 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 14 Oct 2019 12:29:12 -0700 Subject: [PATCH 06/37] update to use staging binaries env var --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d7fae6..703f4a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" -e "BUILDPACK_VENDOR_URL=$BUILDPACK_VENDOR_URL" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-18 bash $TESTFOLDER jobs: include: @@ -28,11 +28,11 @@ jobs: env: matrix: - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-deps BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-deps USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-versions BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-versions USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-features - - TESTFOLDER=test/run-features BUILDPACK_VENDOR_URL=https://lang-python.s3.amazonaws.com/staging/$STACK + - TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true From dc694d4712f9439ac46bc210dacaf5f8c1a98be0 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 08:52:33 -0700 Subject: [PATCH 07/37] test for 3.5 warn should pass when using staged binaries --- test/run-versions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/run-versions b/test/run-versions index 2526238..023e418 100755 --- a/test/run-versions +++ b/test/run-versions @@ -73,10 +73,14 @@ testPython3_5() { testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK = "cedar-14" ]]; then + if [[ $STACK = "cedar-14" ]] ; then assertCaptured "python-3.5.3" assertCaptured "security update!" assertCapturedError + elif [[ -n ${USE_STAGING_BINARIES} ]]; then + assertCaptured "python-3.5.3" + assertCaptured "security update!" + assertCapturedSuccess else assertCapturedError fi From 9ca0c4eb8435a0ad18b1725dae2a77c2f860b7b9 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 09:36:29 -0700 Subject: [PATCH 08/37] check for 3.5 on all stacks --- test/run-versions | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/test/run-versions b/test/run-versions index 023e418..bf4b8b8 100755 --- a/test/run-versions +++ b/test/run-versions @@ -61,23 +61,17 @@ testPython3_4_fail() { } testPython3_5() { - if [[ $STACK != "cedar-14" ]]; then - updateVersion "python3_5" $LATEST_35 - compile "python3_5" - assertCaptured $LATEST_35 - assertNotCaptured "security update" - assertCaptured "Installing SQLite3" - assertCapturedSuccess - fi + updateVersion "python3_5" $LATEST_35 + compile "python3_5" + assertCaptured $LATEST_35 + assertNotCaptured "security update" + assertCaptured "Installing SQLite3" + assertCapturedSuccess } testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK = "cedar-14" ]] ; then - assertCaptured "python-3.5.3" - assertCaptured "security update!" - assertCapturedError - elif [[ -n ${USE_STAGING_BINARIES} ]]; then + if [[ $STACK == "cedar-14" ]] || [[ -n ${USE_STAGING_BINARIES} ]]; then assertCaptured "python-3.5.3" assertCaptured "security update!" assertCapturedSuccess From f90dfbc12e80e352e448eb9dc1e724e3c7a2670c Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 09:40:31 -0700 Subject: [PATCH 09/37] update 3.4 tests to fail on heroku 18 --- test/run-versions | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/test/run-versions b/test/run-versions index bf4b8b8..3459aa5 100755 --- a/test/run-versions +++ b/test/run-versions @@ -38,12 +38,14 @@ testPython2_fail() { } testPython3_4() { - if [[ $STACK != "cedar-14" ]]; then - updateVersion "python3_4" $LATEST_34 - compile "python3_4" - assertCaptured $LATEST_34 - assertNotCaptured "security update" + updateVersion "python3_4" $LATEST_34 + compile "python3_4" + assertCaptured $LATEST_34 + assertNotCaptured "security update" + if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then assertCapturedSuccess + else + assertCapturedError fi } @@ -51,7 +53,11 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - assertCapturedSuccess + if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then + assertCapturedSuccess + else + assertCapturedError + fi } testPython3_4_fail() { From f1b0f8c15482a9c157e36666472f8004732f8282 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 24 Oct 2019 12:48:04 -0700 Subject: [PATCH 10/37] correct the pass/fail metric for python 34 --- test/fixtures/python3_4/runtime.txt | 2 +- test/run-versions | 23 ++++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/test/fixtures/python3_4/runtime.txt b/test/fixtures/python3_4/runtime.txt index cc8325f..3b5c63e 100644 --- a/test/fixtures/python3_4/runtime.txt +++ b/test/fixtures/python3_4/runtime.txt @@ -1 +1 @@ -python-3.4.9 +python-3.4.10 diff --git a/test/run-versions b/test/run-versions index 3459aa5..6a5f67a 100755 --- a/test/run-versions +++ b/test/run-versions @@ -38,14 +38,18 @@ testPython2_fail() { } testPython3_4() { - updateVersion "python3_4" $LATEST_34 compile "python3_4" assertCaptured $LATEST_34 assertNotCaptured "security update" - if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then - assertCapturedSuccess + # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. + if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then + assertCapturedError +# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. + elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + assertCapturedError else - assertCapturedError +# all else succeed + assertCapturedSuccess fi } @@ -53,10 +57,15 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - if [[ $STACK == "cedar-14" ]] || [[ $STACK == "heroku-16" ]]; then - assertCapturedSuccess + # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. + if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then + assertCapturedError +# if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. + elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + assertCapturedError else - assertCapturedError +# all else succeed + assertCapturedSuccess fi } From a7f62496b1f574a919d92f02e7b32ea4e737c7be Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 28 Oct 2019 15:16:14 -0700 Subject: [PATCH 11/37] correct python35 tests --- test/fixtures/python3_5/runtime.txt | 2 +- test/fixtures/python3_5_warn/runtime.txt | 2 +- test/run-versions | 11 +++-------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/test/fixtures/python3_5/runtime.txt b/test/fixtures/python3_5/runtime.txt index e6391f4..df4118a 100644 --- a/test/fixtures/python3_5/runtime.txt +++ b/test/fixtures/python3_5/runtime.txt @@ -1 +1 @@ -python-3.5.6 +python-3.5.7 diff --git a/test/fixtures/python3_5_warn/runtime.txt b/test/fixtures/python3_5_warn/runtime.txt index 5486d7a..e6391f4 100644 --- a/test/fixtures/python3_5_warn/runtime.txt +++ b/test/fixtures/python3_5_warn/runtime.txt @@ -1 +1 @@ -python-3.5.3 +python-3.5.6 diff --git a/test/run-versions b/test/run-versions index 6a5f67a..8ad9d1c 100755 --- a/test/run-versions +++ b/test/run-versions @@ -76,7 +76,6 @@ testPython3_4_fail() { } testPython3_5() { - updateVersion "python3_5" $LATEST_35 compile "python3_5" assertCaptured $LATEST_35 assertNotCaptured "security update" @@ -86,13 +85,9 @@ testPython3_5() { testPython3_5_warn() { compile "python3_5_warn" - if [[ $STACK == "cedar-14" ]] || [[ -n ${USE_STAGING_BINARIES} ]]; then - assertCaptured "python-3.5.3" - assertCaptured "security update!" - assertCapturedSuccess - else - assertCapturedError - fi + assertCaptured "python-3.5.6" + assertCaptured "security update!" + assertCapturedSuccess } testPython3_5_fail() { From 3c193bd4757606b9ec2280970fbe8e16d8ccd1bb Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 07:42:50 -0700 Subject: [PATCH 12/37] update 3.4 warn test --- test/run-versions | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/run-versions b/test/run-versions index 8ad9d1c..0698b7c 100755 --- a/test/run-versions +++ b/test/run-versions @@ -57,11 +57,8 @@ testPython3_4_warn() { compile "python3_4_warn" assertCaptured "python-3.4.9" assertCaptured "security update!" - # if cedar 14 and legacy binaries, fail. if cedar 14 and staging, succeed. - if [[ ! -n $USE_STAGING_BINARIES ]] && [[ $STACK == "cedar-14" ]]; then - assertCapturedError # if heroku 18 and legacy binaries, succeed. if heroku 18 and staging, fail. - elif [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then + if [[ -n $USE_STAGING_BINARIES ]] && [[ $STACK == "heroku-18" ]]; then assertCapturedError else # all else succeed From 9bd5fa7c7f8c0a7443ded166a9c166abe31f58d2 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 11:25:39 -0700 Subject: [PATCH 13/37] replace formula sqlite install --- builds/runtimes/python3 | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/builds/runtimes/python3 b/builds/runtimes/python3 index 79f4421..0638218 100755 --- a/builds/runtimes/python3 +++ b/builds/runtimes/python3 @@ -16,16 +16,19 @@ python_version=${BASE^} # this gives us only the filename with version number version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python 3..." -echo "Pulling from source: ${dep_url}" +# Install SQLITE, as headers are not available out of the box on the stack +apt-get install libsqlite3-dev +needed=( libsqlite3-dev ) +if [[ $STACK != "heroku-16" && $STACK != "heroku-16" ]]; then + needed+=( realpath ) +# Check whether our packages are missing on the stack +missing=$(comm -1 -3 <(dpkg-query -W -f '${package}\n' | sort) <(IFS=$'\n'; echo "${needed[*]}" | sort)) +if [[ "$missing" ]]; then + # install missing and needed packages + apt-get update -qq || { echo "Failed to 'apt-get update'. You must build this formula using Docker."; exit 1; } + apt-get install -q -y $missing +fi curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}" mv "${OUT_PREFIX}/${python_version}" src From 14c15f4dd8ed272380a8fb6101ec0ce318ff3084 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 11:57:17 -0700 Subject: [PATCH 14/37] create symlinks for python3 formula to sqlite --- builds/runtimes/python3 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builds/runtimes/python3 b/builds/runtimes/python3 index 0638218..5e5b290 100755 --- a/builds/runtimes/python3 +++ b/builds/runtimes/python3 @@ -45,4 +45,9 @@ find "${OUT_PREFIX}" \( -type d -a \( -name test -o -name tests \) \) -exec rm - # Remove spare / LOCATION=${OUT_PREFIX%?} +# Create links to SQLITE headers so Python can call them at runtime +mkdir -p ${OUT_PREFIX}/include ${OUT_PREFIX}/lib/x86_64-linux-gnu +cp /usr/include/sqlite3*.h ${OUT_PREFIX}/include +ln -fs $(realpath /usr/lib/x86_64-linux-gnu/libsqlite3.so) ${OUT_PREFIX}/lib/x86_64-linux-gnu/libsqlite3.so + ln $LOCATION/bin/python3 $LOCATION/bin/python From 3f9a80ad2434165edb6ea55133461091acd823d8 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 30 Sep 2019 15:14:28 -0700 Subject: [PATCH 15/37] don't check stack defensively as its not forwards compatible --- builds/runtimes/python3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builds/runtimes/python3 b/builds/runtimes/python3 index 5e5b290..5578cec 100755 --- a/builds/runtimes/python3 +++ b/builds/runtimes/python3 @@ -19,7 +19,7 @@ dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz # Install SQLITE, as headers are not available out of the box on the stack apt-get install libsqlite3-dev needed=( libsqlite3-dev ) -if [[ $STACK != "heroku-16" && $STACK != "heroku-16" ]]; then +if [[ $STACK == "cedar-14" ]]; then needed+=( realpath ) # Check whether our packages are missing on the stack From 0be5993e32c24b4ce14eabe3957306f4b6457b3e Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 8 Oct 2019 12:27:41 -0700 Subject: [PATCH 16/37] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a24212..9681260 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Master +- Sqlite fix: + - base Python3 file corrected - Test staged binaries on Travis -------------------------------------------------------------------------------- From 50cdf10a36b00f249c00b9ded9ada8e291a5bfbe Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 8 Oct 2019 13:22:04 -0700 Subject: [PATCH 17/37] move libsqlite-dev install back to dockerfile --- builds/cedar-14.Dockerfile | 2 +- builds/heroku-16.Dockerfile | 2 +- builds/heroku-18.Dockerfile | 2 +- builds/runtimes/python3 | 14 -------------- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/builds/cedar-14.Dockerfile b/builds/cedar-14.Dockerfile index ea11542..5d1ae59 100644 --- a/builds/cedar-14.Dockerfile +++ b/builds/cedar-14.Dockerfile @@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \ DEBIAN_FRONTEND=noninteractive \ STACK="cedar-14" -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 libsqlite3-dev realpath && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/ RUN pip install -r /app/requirements.txt diff --git a/builds/heroku-16.Dockerfile b/builds/heroku-16.Dockerfile index 324042e..6b0728e 100644 --- a/builds/heroku-16.Dockerfile +++ b/builds/heroku-16.Dockerfile @@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \ DEBIAN_FRONTEND=noninteractive \ STACK="heroku-16" -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 libsqlite3-dev && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/ RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt diff --git a/builds/heroku-18.Dockerfile b/builds/heroku-18.Dockerfile index 7f0f942..80ad34d 100644 --- a/builds/heroku-18.Dockerfile +++ b/builds/heroku-18.Dockerfile @@ -7,7 +7,7 @@ ENV WORKSPACE_DIR="/app/builds" \ DEBIAN_FRONTEND=noninteractive \ STACK="heroku-18" -RUN apt-get update && apt-get install --no-install-recommends -y python-pip-whl=9.0.1-2 python-pip=9.0.1-2 python-setuptools python-wheel && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install --no-install-recommends -y python-pip-whl=9.0.1-2 python-pip=9.0.1-2 python-setuptools python-wheel libsqlite3-dev && rm -rf /var/lib/apt/lists/* COPY requirements.txt /app/ RUN pip install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt diff --git a/builds/runtimes/python3 b/builds/runtimes/python3 index 5578cec..1b6d152 100755 --- a/builds/runtimes/python3 +++ b/builds/runtimes/python3 @@ -16,20 +16,6 @@ python_version=${BASE^} # this gives us only the filename with version number version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz -# Install SQLITE, as headers are not available out of the box on the stack -apt-get install libsqlite3-dev -needed=( libsqlite3-dev ) -if [[ $STACK == "cedar-14" ]]; then - needed+=( realpath ) - -# Check whether our packages are missing on the stack -missing=$(comm -1 -3 <(dpkg-query -W -f '${package}\n' | sort) <(IFS=$'\n'; echo "${needed[*]}" | sort)) -if [[ "$missing" ]]; then - # install missing and needed packages - apt-get update -qq || { echo "Failed to 'apt-get update'. You must build this formula using Docker."; exit 1; } - apt-get install -q -y $missing -fi - curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}" mv "${OUT_PREFIX}/${python_version}" src cd src From 1c87fd3d6e0f2df76a20350cd13ea646dd1316d7 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 14:17:46 -0700 Subject: [PATCH 18/37] correct changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9681260..260eed9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ # Master - Sqlite fix: - - base Python3 file corrected + - Update Python3 base formula - Test staged binaries on Travis -------------------------------------------------------------------------------- From 151df58e86f973c53cc344745ca3cf9aa52dc054 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 8 Oct 2019 13:23:39 -0700 Subject: [PATCH 19/37] don't use vendored sqlite from s3 in formulas --- builds/runtimes/python-3.6.9 | 1 - builds/runtimes/python-3.7.4 | 1 - 2 files changed, 2 deletions(-) diff --git a/builds/runtimes/python-3.6.9 b/builds/runtimes/python-3.6.9 index dea889d..ad41723 100755 --- a/builds/runtimes/python-3.6.9 +++ b/builds/runtimes/python-3.6.9 @@ -1,5 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -# Build Deps: libraries/sqlite source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.7.4 b/builds/runtimes/python-3.7.4 index dea889d..ad41723 100755 --- a/builds/runtimes/python-3.7.4 +++ b/builds/runtimes/python-3.7.4 @@ -1,5 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -# Build Deps: libraries/sqlite source $(dirname $0)/python3 From 43c54abf0ed8b72f4ff750f29c05a51571c54a06 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 14:36:46 -0700 Subject: [PATCH 20/37] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 260eed9..1a726da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Sqlite fix: - Update Python3 base formula + - Update Python formulas 3.6.9 and 3.7.4 - Test staged binaries on Travis -------------------------------------------------------------------------------- From c12f395c9a448912cfc95e2e07a2841d4f042d21 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Wed, 9 Oct 2019 13:19:53 -0700 Subject: [PATCH 21/37] update all 3.6 formulas to load python3 base --- builds/runtimes/python-3.6.0 | 16 +--------------- builds/runtimes/python-3.6.1 | 16 +--------------- builds/runtimes/python-3.6.2 | 19 +------------------ builds/runtimes/python-3.6.3 | 19 +------------------ builds/runtimes/python-3.6.4 | 19 +------------------ builds/runtimes/python-3.6.5 | 19 +------------------ builds/runtimes/python-3.6.6 | 27 +-------------------------- builds/runtimes/python-3.6.7 | 30 +----------------------------- builds/runtimes/python-3.6.8 | 30 +----------------------------- 9 files changed, 9 insertions(+), 186 deletions(-) diff --git a/builds/runtimes/python-3.6.0 b/builds/runtimes/python-3.6.0 index 9c31d24..ad41723 100755 --- a/builds/runtimes/python-3.6.0 +++ b/builds/runtimes/python-3.6.0 @@ -1,18 +1,4 @@ #!/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.0/Python-3.6.0.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.0 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install - -ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.1 b/builds/runtimes/python-3.6.1 index 263fc08..ad41723 100755 --- a/builds/runtimes/python-3.6.1 +++ b/builds/runtimes/python-3.6.1 @@ -1,18 +1,4 @@ #!/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.1/Python-3.6.1.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.1 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install - -ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.2 b/builds/runtimes/python-3.6.2 index 9b23a90..ad41723 100755 --- a/builds/runtimes/python-3.6.2 +++ b/builds/runtimes/python-3.6.2 @@ -1,21 +1,4 @@ #!/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.2/Python-3.6.2.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.2 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 +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.3 b/builds/runtimes/python-3.6.3 index 08f33fe..ad41723 100755 --- a/builds/runtimes/python-3.6.3 +++ b/builds/runtimes/python-3.6.3 @@ -1,21 +1,4 @@ #!/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.3/Python-3.6.3.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.3 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 +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.4 b/builds/runtimes/python-3.6.4 index d1a93df..ad41723 100755 --- a/builds/runtimes/python-3.6.4 +++ b/builds/runtimes/python-3.6.4 @@ -1,21 +1,4 @@ #!/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.4/Python-3.6.4.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.4 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 +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.5 b/builds/runtimes/python-3.6.5 index e76cd6a..ad41723 100755 --- a/builds/runtimes/python-3.6.5 +++ b/builds/runtimes/python-3.6.5 @@ -1,21 +1,4 @@ #!/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.5/Python-3.6.5.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.5 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 +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.6 b/builds/runtimes/python-3.6.6 index a3bf0f8..ad41723 100755 --- a/builds/runtimes/python-3.6.6 +++ b/builds/runtimes/python-3.6.6 @@ -1,29 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 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 +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.7 b/builds/runtimes/python-3.6.7 index 052ee1e..ad41723 100755 --- a/builds/runtimes/python-3.6.7 +++ b/builds/runtimes/python-3.6.7 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.6.7/Python-3.6.7.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.7 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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.6.8 b/builds/runtimes/python-3.6.8 index a47f466..ad41723 100755 --- a/builds/runtimes/python-3.6.8 +++ b/builds/runtimes/python-3.6.8 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.6.8/Python-3.6.8.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.6.8 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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 From 13fad186ffe710cb94effb89b1dc5258568d5d30 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 14:39:54 -0700 Subject: [PATCH 22/37] changelog update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a726da..c55b720 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Sqlite fix: - Update Python3 base formula - - Update Python formulas 3.6.9 and 3.7.4 + - Update Python formulas 3.6.x, 3.7.4 - Test staged binaries on Travis -------------------------------------------------------------------------------- From fade163df88ff0c05da1914529935813eb4dce3b Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Sat, 12 Oct 2019 17:04:46 -0700 Subject: [PATCH 23/37] update Changelog --- builds/runtimes/python-3.7.0 | 27 +-------------------------- builds/runtimes/python-3.7.1 | 30 +----------------------------- builds/runtimes/python-3.7.2 | 30 +----------------------------- builds/runtimes/python-3.7.3 | 30 +----------------------------- 4 files changed, 4 insertions(+), 113 deletions(-) diff --git a/builds/runtimes/python-3.7.0 b/builds/runtimes/python-3.7.0 index 74dccc5..ad41723 100755 --- a/builds/runtimes/python-3.7.0 +++ b/builds/runtimes/python-3.7.0 @@ -1,29 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 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 +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.7.1 b/builds/runtimes/python-3.7.1 index b805139..ad41723 100755 --- a/builds/runtimes/python-3.7.1 +++ b/builds/runtimes/python-3.7.1 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.7.1/Python-3.7.1.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.7.1 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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.7.2 b/builds/runtimes/python-3.7.2 index 4d74b89..ad41723 100755 --- a/builds/runtimes/python-3.7.2 +++ b/builds/runtimes/python-3.7.2 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.7.2/Python-3.7.2.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.7.2 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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.7.3 b/builds/runtimes/python-3.7.3 index 4254362..ad41723 100755 --- a/builds/runtimes/python-3.7.3 +++ b/builds/runtimes/python-3.7.3 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.7.3/Python-3.7.3.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.7.3 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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 From f28465bec7f5cf1bb46a2fdf14a44816451e304e Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 14:46:29 -0700 Subject: [PATCH 24/37] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c55b720..c488ac8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Sqlite fix: - Update Python3 base formula - - Update Python formulas 3.6.x, 3.7.4 + - Update Python formulas 3.6.x, 3.7.x - Test staged binaries on Travis -------------------------------------------------------------------------------- From 3c40bf8bea32706847051430eb7b9ab63191187e Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Sun, 13 Oct 2019 18:02:20 -0700 Subject: [PATCH 25/37] update 3.5 formulas --- builds/runtimes/python-3.5.0 | 4 ++++ builds/runtimes/python-3.5.1 | 4 ++++ builds/runtimes/python-3.5.2 | 16 +--------------- builds/runtimes/python-3.5.3 | 16 +--------------- builds/runtimes/python-3.5.4 | 4 ++++ builds/runtimes/python-3.5.5 | 4 ++++ builds/runtimes/python-3.5.6 | 30 +----------------------------- builds/runtimes/python-3.5.7 | 30 +----------------------------- 8 files changed, 20 insertions(+), 88 deletions(-) create mode 100755 builds/runtimes/python-3.5.0 create mode 100755 builds/runtimes/python-3.5.1 create mode 100755 builds/runtimes/python-3.5.4 create mode 100755 builds/runtimes/python-3.5.5 diff --git a/builds/runtimes/python-3.5.0 b/builds/runtimes/python-3.5.0 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.5.0 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.1 b/builds/runtimes/python-3.5.1 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.5.1 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.2 b/builds/runtimes/python-3.5.2 index 49806e6..ad41723 100755 --- a/builds/runtimes/python-3.5.2 +++ b/builds/runtimes/python-3.5.2 @@ -1,18 +1,4 @@ #!/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.2/Python-3.5.2.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.5.2 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install - -# ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.3 b/builds/runtimes/python-3.5.3 index 6e54f88..ad41723 100755 --- a/builds/runtimes/python-3.5.3 +++ b/builds/runtimes/python-3.5.3 @@ -1,18 +1,4 @@ #!/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.3/Python-3.5.3.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.5.3 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install - -# ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.4 b/builds/runtimes/python-3.5.4 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.5.4 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.5 b/builds/runtimes/python-3.5.5 new file mode 100755 index 0000000..ad41723 --- /dev/null +++ b/builds/runtimes/python-3.5.5 @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +# Build Path: /app/.heroku/python/ + +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.6 b/builds/runtimes/python-3.5.6 index 0d17935..ad41723 100755 --- a/builds/runtimes/python-3.5.6 +++ b/builds/runtimes/python-3.5.6 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.5.6/Python-3.5.6.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.5.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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 diff --git a/builds/runtimes/python-3.5.7 b/builds/runtimes/python-3.5.7 index 2a07209..ad41723 100755 --- a/builds/runtimes/python-3.5.7 +++ b/builds/runtimes/python-3.5.7 @@ -1,32 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/3.5.7/Python-3.5.7.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-3.5.7 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 '{}' + - -# Remove spare / -LOCATION=${OUT_PREFIX%?} - -ln $LOCATION/bin/python3 $LOCATION/bin/python +source $(dirname $0)/python3 From a421ea93e349456932c390213e3dbf0923412d83 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 14:59:48 -0700 Subject: [PATCH 26/37] update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c488ac8..7b845d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Sqlite fix: - Update Python3 base formula - - Update Python formulas 3.6.x, 3.7.x + - Update Python formulas 3.6.x, 3.7.x, 3.5.x - Test staged binaries on Travis -------------------------------------------------------------------------------- From bf1b1dc3f81d65e09fc30fa73b381490a02db7a9 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Sun, 13 Oct 2019 18:26:16 -0700 Subject: [PATCH 27/37] update base Python 2 formula --- builds/runtimes/python2 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/builds/runtimes/python2 b/builds/runtimes/python2 index 5794991..b309254 100644 --- a/builds/runtimes/python2 +++ b/builds/runtimes/python2 @@ -12,14 +12,7 @@ python_version=${BASE^} # this gives us only the filename with version number version_number=$(echo "$python_version" | cut -d- -f2) # this returns just X.X.X dep_url=https://python.org/ftp/python/${version_number}/${python_version}.tgz -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python 3..." +echo "Building ${python_version}..." echo "Pulling from source: ${dep_url}" curl -L "${dep_url}" | tar xz -C "${OUT_PREFIX}" @@ -33,3 +26,8 @@ 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 '{}' + + +# Create links to SQLITE headers so Python can call them at runtime +mkdir -p ${OUT_PREFIX}/include ${OUT_PREFIX}/lib/x86_64-linux-gnu +cp /usr/include/sqlite3*.h ${OUT_PREFIX}/include +ln -fs $(realpath /usr/lib/x86_64-linux-gnu/libsqlite3.so) ${OUT_PREFIX}/lib/x86_64-linux-gnu/libsqlite3.so From f03b7ed048129f7587302d12460b4b32520f7c00 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 15:06:41 -0700 Subject: [PATCH 28/37] update Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b845d0..c7f7b31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ # Master - Sqlite fix: - - Update Python3 base formula + - Update Python3 and Python2 base formula - Update Python formulas 3.6.x, 3.7.x, 3.5.x - Test staged binaries on Travis From 87ba8b499a85c0ad91db15dc3c0f3ca1de11bfbd Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Sun, 13 Oct 2019 20:46:08 -0700 Subject: [PATCH 29/37] Update python 2 formulas --- builds/runtimes/python-2.7.10 | 13 +------------ builds/runtimes/python-2.7.11 | 13 +------------ builds/runtimes/python-2.7.12 | 13 +------------ builds/runtimes/python-2.7.13 | 17 +---------------- builds/runtimes/python-2.7.14 | 17 +---------------- builds/runtimes/python-2.7.15 | 25 +------------------------ builds/runtimes/python-2.7.16 | 25 +------------------------ builds/runtimes/python-2.7.9 | 13 +------------ 8 files changed, 8 insertions(+), 128 deletions(-) diff --git a/builds/runtimes/python-2.7.10 b/builds/runtimes/python-2.7.10 index 4ab82dc..ef21c72 100755 --- a/builds/runtimes/python-2.7.10 +++ b/builds/runtimes/python-2.7.10 @@ -1,15 +1,4 @@ #!/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/2.7.10/Python-2.7.10.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.10 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.11 b/builds/runtimes/python-2.7.11 index 903a4a2..ef21c72 100755 --- a/builds/runtimes/python-2.7.11 +++ b/builds/runtimes/python-2.7.11 @@ -1,15 +1,4 @@ #!/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/2.7.11/Python-2.7.11.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.11 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.12 b/builds/runtimes/python-2.7.12 index 3a721c3..ef21c72 100755 --- a/builds/runtimes/python-2.7.12 +++ b/builds/runtimes/python-2.7.12 @@ -1,15 +1,4 @@ #!/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/2.7.12/Python-2.7.12.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.12 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.13 b/builds/runtimes/python-2.7.13 index 4379d2e..ef21c72 100755 --- a/builds/runtimes/python-2.7.13 +++ b/builds/runtimes/python-2.7.13 @@ -1,19 +1,4 @@ #!/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/2.7.13/Python-2.7.13.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.13 src -cd src - -./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --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 '{}' + +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.14 b/builds/runtimes/python-2.7.14 index fa16fd5..ef21c72 100755 --- a/builds/runtimes/python-2.7.14 +++ b/builds/runtimes/python-2.7.14 @@ -1,19 +1,4 @@ #!/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/2.7.14/Python-2.7.14.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.14 src -cd src - -./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --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 '{}' + +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.15 b/builds/runtimes/python-2.7.15 index a2363fb..ef21c72 100755 --- a/builds/runtimes/python-2.7.15 +++ b/builds/runtimes/python-2.7.15 @@ -1,27 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/2.7.15/Python-2.7.15.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.15 src -cd src - -./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --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 '{}' + +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.16 b/builds/runtimes/python-2.7.16 index c2ac296..ef21c72 100755 --- a/builds/runtimes/python-2.7.16 +++ b/builds/runtimes/python-2.7.16 @@ -1,27 +1,4 @@ #!/usr/bin/env bash # Build Path: /app/.heroku/python/ -OUT_PREFIX=$1 -BIN_DIR="$(cd "$(dirname "$0")"/../.. || exit; pwd)/bin" -export BIN_DIR - -# shellcheck source=bin/utils -source "$BIN_DIR/steps/sqlite3" - -sqlite3_version -echo "Setting up SQLite3 Headers for $SQLITE3_VERSION" -sqlite3_install "$OUT_PREFIX" "$SQLITE3_VERSION" 1 - -echo "Building Python…" -SOURCE_TARBALL='https://python.org/ftp/python/2.7.16/Python-2.7.16.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.16 src -cd src - -./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --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 '{}' + +source $(dirname $0)/python2 diff --git a/builds/runtimes/python-2.7.9 b/builds/runtimes/python-2.7.9 index 1ab0085..ef21c72 100755 --- a/builds/runtimes/python-2.7.9 +++ b/builds/runtimes/python-2.7.9 @@ -1,15 +1,4 @@ #!/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/2.7.9/Python-2.7.9.tgz' -curl -L $SOURCE_TARBALL | tar xz -mv Python-2.7.9 src -cd src - -./configure --prefix=$OUT_PREFIX --with-ensurepip=no -make -make install +source $(dirname $0)/python2 From 2a4f0a66c3f3ff8670a166e43223069374462ddf Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 29 Oct 2019 15:15:46 -0700 Subject: [PATCH 30/37] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f7b31..2132849 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - Sqlite fix: - Update Python3 and Python2 base formula - - Update Python formulas 3.6.x, 3.7.x, 3.5.x + - Update Python formulas 3.6.x, 3.7.x, 3.5.x, and 2.7.17-2.7.9 - Test staged binaries on Travis -------------------------------------------------------------------------------- From ba55465a2b3daa7c83d46e25cb2422215a4c4788 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 2 Dec 2019 15:16:31 -0500 Subject: [PATCH 31/37] Version bump sqlite --- CHANGELOG.md | 1 + bin/steps/sqlite3 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2132849..0926b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - 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 -------------------------------------------------------------------------------- diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 3faae6e..da63d9c 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -7,9 +7,9 @@ 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.2" + SQLITE3_VERSION="3.11.0-1ubuntu1.3" else - SQLITE3_VERSION=${SQLITE3_VERSION:-$(dpkg -s libsqlite3-0 | grep Version | sed 's/Version: //')} + SQLITE3_VERSION="3.22.0-1ubuntu0.2" fi export SQLITE3_VERSION From d166ee88d7d7ecb793e42506d858e6e771684045 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 2 Dec 2019 15:22:03 -0500 Subject: [PATCH 32/37] add tracking for sqlite install success or failure --- bin/steps/sqlite3 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index da63d9c..8a91e91 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -83,7 +83,14 @@ buildpack_sqlite3_install() { # only install if the sqlite3 version has changed if [ "$INSTALLED_SQLITE3_VERSION" != "$SQLITE3_VERSION" ]; then puts-step "Installing SQLite3" - sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION" + + if sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION" ; then + echo "Sqlite3 successfully installed." + mcount "success.python.sqlite3" + else + echo "Sqlite3 failed to install." + mcount "failure.python.sqlite3" + fi # save version installed mkdir -p "$CACHE_DIR/.heroku/" From 475af5a1f8b9e67d26a97951f53ec7a6fa33212e Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Mon, 2 Dec 2019 15:57:05 -0500 Subject: [PATCH 33/37] test that sqlite installs properly --- test/run-deps | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/run-deps b/test/run-deps index bd03fa7..29d7f8f 100755 --- a/test/run-deps +++ b/test/run-deps @@ -46,6 +46,13 @@ testPysqlite() { assertCapturedSuccess } +testSqliteInstall() { + compile "pythonDefault" + assertCaptured "Sqlite3 successfully installed." + assertNotCaptured "Sqlite3 failed to install." + assertCapturedSuccess +} + testCffi() { compile "cffi" assertCaptured "cffi" From ffc7683c05c924d345b43c6ad1c5ea8b4a5a5fb1 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 5 Dec 2019 11:17:58 -0500 Subject: [PATCH 34/37] remove broken pin from sqlite install --- bin/steps/sqlite3 | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 8a91e91..8ecdecb 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -3,21 +3,10 @@ # shellcheck source=bin/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_version() sqlite3_install() { HEROKU_PYTHON_DIR="$1" - SQLITE3_VERSION="$2" HEADERS_ONLY="$3" mkdir -p "$HEROKU_PYTHON_DIR" @@ -35,9 +24,9 @@ sqlite3_install() { apt-get $APT_OPTIONS update > /dev/null 2>&1 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 - apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev="$SQLITE3_VERSION" + apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev fi find "$APT_CACHE_DIR/archives/" -name "*.deb" -exec dpkg -x {} "$HEROKU_PYTHON_DIR/sqlite3/" \; @@ -70,7 +59,6 @@ sqlite3_install() { } buildpack_sqlite3_install() { - sqlite3_version HEROKU_PYTHON_DIR="$BUILD_DIR/.heroku/python" SQLITE3_VERSION_FILE="$BUILD_DIR/.heroku/python-sqlite3-version" @@ -80,21 +68,14 @@ buildpack_sqlite3_install() { # python version check 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" + puts-step "Installing SQLite3" - if sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION" ; then - echo "Sqlite3 successfully installed." - mcount "success.python.sqlite3" - else - echo "Sqlite3 failed to install." - mcount "failure.python.sqlite3" - fi - - # save version installed - mkdir -p "$CACHE_DIR/.heroku/" - echo "$SQLITE3_VERSION" > "$CACHE_DIR/.heroku/python-sqlite3-version" + if sqlite3_install "$BUILD_DIR/.heroku/python" ; then + echo "Sqlite3 successfully installed." + mcount "success.python.sqlite3" + else + echo "Sqlite3 failed to install." + mcount "failure.python.sqlite3" fi fi } From f0f3463658b3707ff19509e434e9930df726f4ae Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 5 Dec 2019 11:54:58 -0500 Subject: [PATCH 35/37] remove typo --- bin/steps/sqlite3 | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 8ecdecb..6216177 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -3,8 +3,6 @@ # shellcheck source=bin/utils source "$BIN_DIR/utils" -sqlite3_version() - sqlite3_install() { HEROKU_PYTHON_DIR="$1" HEADERS_ONLY="$3" @@ -66,16 +64,13 @@ buildpack_sqlite3_install() { INSTALLED_SQLITE3_VERSION=$(cat "$SQLITE3_VERSION_FILE") fi - # python version check - if python_sqlite3_check "$PYTHON_VERSION"; then - puts-step "Installing SQLite3" + puts-step "Installing SQLite3" - if sqlite3_install "$BUILD_DIR/.heroku/python" ; then - echo "Sqlite3 successfully installed." - mcount "success.python.sqlite3" - else - echo "Sqlite3 failed to install." - mcount "failure.python.sqlite3" - fi + if sqlite3_install "$BUILD_DIR/.heroku/python" ; then + echo "Sqlite3 successfully installed." + mcount "success.python.sqlite3" + else + echo "Sqlite3 failed to install." + mcount "failure.python.sqlite3" fi } From 5788ff57cd7fa3f5288dac9cb069b9fbd1cdb9b6 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 5 Dec 2019 11:59:13 -0500 Subject: [PATCH 36/37] changelog --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0926b54..d26e7e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,14 @@ # Master -- Sqlite fix: - - 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 +- Bug fix: fragile sqlite3 install -------------------------------------------------------------------------------- +# 161 (2019-12-2) + +- Bug fix: Sqlite3 version bump + # 160 (2019-10-23) - Bugfix: Pipenv no longer installs twice in CI From f31e9fa83582cc735753b78b4f594c79972638e3 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Fri, 6 Dec 2019 09:20:28 -0500 Subject: [PATCH 37/37] Correct failing smart requirement steps --- .travis.yml | 3 --- bin/steps/sqlite3 | 2 ++ test/run-features | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 703f4a1..102e16e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,8 @@ jobs: env: matrix: - 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 USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-features - - TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 6216177..2d8dc91 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -73,4 +73,6 @@ buildpack_sqlite3_install() { echo "Sqlite3 failed to install." mcount "failure.python.sqlite3" fi + + mkdir -p "$CACHE_DIR/.heroku/" } diff --git a/test/run-features b/test/run-features index 66fac4e..c3ee1f2 100755 --- a/test/run-features +++ b/test/run-features @@ -16,7 +16,6 @@ testSmartRequirements() { assertFile "requests" ".heroku/python/requirements-declared.txt" assertCapturedSuccess compile "psycopg2" "$cache_dir" - assertCaptured "Uninstalling requests" assertFile "psycopg2" ".heroku/python/requirements-declared.txt" assertCapturedSuccess }