mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
eabe71d578
The existing Python 3.4.10 archive actually contained Python 3.7.2, since the version in the source URL was not updated when the file was created in #813. The build formula now uses the shared build script approach like all of the other build scripts, which ensures the version can never get out of sync (since it's extracted from the formula filename). The build for Heroku-18 failed to compile `_ssl` properly (even though the build exited zero) since Python 3.4.10 is old enough it doesn't work well with libssl1.1. Installing `libssl1.0-dev` in the build image locally resolved the issue - however we don't want to use that in the future for newer Python, so I've not updated the `heroku-18.Dockerfile`. In addition, with the rebuilt archives the tests now pass on Cedar-14, so no longer need to be marked as failing. Closes @W-7947035@.
230 lines
5.4 KiB
Bash
Executable File
230 lines
5.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Default Python Versions
|
|
# shellcheck source=bin/default_pythons
|
|
source "bin/default_pythons"
|
|
|
|
testPythonDefault() {
|
|
updateVersion "pythonDefault" $DEFAULT_PYTHON_VERSION
|
|
compile "pythonDefault"
|
|
assertCaptured $DEFAULT_PYTHON_VERSION
|
|
assertNotCaptured "security update"
|
|
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython2() {
|
|
updateVersion "python2" $LATEST_27
|
|
echo $LATEST_27 > "runtime.txt"
|
|
compile "python2"
|
|
assertCaptured $LATEST_27
|
|
if [[ $(date "+%Y") > "2019" ]]; then
|
|
assertCaptured "python-2-7-eol-faq";
|
|
else
|
|
assertNotCaptured "python-2-7-eol-faq";
|
|
fi
|
|
assertNotCaptured "security update"
|
|
assertCaptured "Installing pip 20.1.1, setuptools 44.1.1 and wheel 0.34.2"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython2_warn() {
|
|
compile "python2_warn"
|
|
assertCaptured "python-2.7.15"
|
|
if [[ $(date "+%Y") > "2019" ]]; then
|
|
assertCaptured "python-2-7-eol-faq";
|
|
else
|
|
assertNotCaptured "python-2-7-eol-faq";
|
|
fi
|
|
assertCaptured "Only the latest version"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython2_fail() {
|
|
compile "python2_fail"
|
|
assertCaptured "Aborting"
|
|
assertCapturedError
|
|
}
|
|
|
|
testPython3_4() {
|
|
compile "python3_4"
|
|
assertCaptured $LATEST_34
|
|
assertNotCaptured "security update"
|
|
assertCaptured "Installing pip 19.1.1, setuptools 43.0.0 and wheel 0.33.6"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython3_4_warn() {
|
|
compile "python3_4_warn"
|
|
assertCaptured "python-3.4.9"
|
|
assertCaptured "security update!"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython3_4_fail() {
|
|
compile "python3_4_fail"
|
|
assertCaptured "Aborting"
|
|
assertCapturedError
|
|
}
|
|
|
|
testPython3_5() {
|
|
compile "python3_5"
|
|
assertCaptured $LATEST_35
|
|
assertNotCaptured "security update"
|
|
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython3_5_warn() {
|
|
compile "python3_5_warn"
|
|
assertCaptured "python-3.5.6"
|
|
assertCaptured "security update!"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython3_5_fail() {
|
|
compile "python3_5_fail"
|
|
assertCaptured "Aborting"
|
|
assertCapturedError
|
|
}
|
|
|
|
testPython3_6() {
|
|
updateVersion "python3_6" $LATEST_36
|
|
compile "python3_6"
|
|
assertCaptured $LATEST_36
|
|
assertNotCaptured "security update"
|
|
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython3_6_warn() {
|
|
compile "python3_6_warn"
|
|
assertCaptured "python-3.6.7"
|
|
assertCaptured "security update!"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPython3_6_fail() {
|
|
compile "python3_6_fail"
|
|
assertCaptured "Aborting"
|
|
assertCapturedError
|
|
}
|
|
|
|
testPython3_7() {
|
|
updateVersion "python3_7" $LATEST_37
|
|
compile "python3_7"
|
|
if [[ $STACK = "cedar-14" ]]; then
|
|
assertCapturedError
|
|
else
|
|
assertNotCaptured "security update"
|
|
assertCaptured $LATEST_37
|
|
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
fi
|
|
}
|
|
|
|
testPython3_7_warn() {
|
|
compile "python3_7_warn"
|
|
if [[ $STACK = "cedar-14" ]]; then
|
|
assertCapturedError
|
|
else
|
|
assertCaptured "python-3.7.1"
|
|
assertCaptured "security update!"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
fi
|
|
}
|
|
|
|
testPython3_7_fail() {
|
|
compile "python3_7_fail"
|
|
assertCaptured "Aborting"
|
|
assertCapturedError
|
|
}
|
|
|
|
testPython3_7_warn() {
|
|
compile "python3_8_warn"
|
|
if [[ $STACK = "cedar-14" ]]; then
|
|
assertCapturedError
|
|
else
|
|
assertCaptured "python-3.8.0"
|
|
assertCaptured "security update!"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
fi
|
|
}
|
|
|
|
testPython3_8() {
|
|
updateVersion "python3_8" $LATEST_38
|
|
compile "python3_8"
|
|
if [[ $STACK = "cedar-14" ]]; then
|
|
assertCapturedError
|
|
else
|
|
assertNotCaptured "security update"
|
|
assertCaptured $LATEST_38
|
|
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
|
|
assertCaptured "Installing SQLite3"
|
|
assertCapturedSuccess
|
|
fi
|
|
}
|
|
|
|
testPython3_8_fail() {
|
|
compile "python3_8_fail"
|
|
assertCaptured "Aborting"
|
|
assertCapturedError
|
|
}
|
|
|
|
testPypy3_6() {
|
|
compile "pypy3_6"
|
|
assertCaptured "Installing pypy"
|
|
assertNotCaptured "security update"
|
|
assertCaptured "$LATEST_PYPY_36"
|
|
assertCaptured "Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPypy3_6_warn() {
|
|
compile "pypy3_6_warn"
|
|
if [[ $STACK = "cedar-14" ]]; then
|
|
assertCapturedError
|
|
else
|
|
assertCaptured "Installing pypy"
|
|
assertCaptured "security update!"
|
|
assertCaptured "$LATEST_PYPY_36"
|
|
assertCapturedSuccess
|
|
fi
|
|
}
|
|
|
|
testPypy2_7() {
|
|
compile "pypy2_7"
|
|
assertCaptured "Installing pypy"
|
|
assertNotCaptured "security update"
|
|
assertCaptured "$LATEST_PYPY_27"
|
|
assertCaptured "Installing pip 20.1.1, setuptools 44.1.1 and wheel 0.34.2"
|
|
assertCapturedSuccess
|
|
}
|
|
|
|
testPypy2_7_warn() {
|
|
compile "pypy2_7_warn"
|
|
if [[ $STACK = "cedar-14" ]]; then
|
|
assertCapturedError
|
|
else
|
|
assertCaptured "Installing pypy"
|
|
assertCaptured "security update!"
|
|
assertCaptured "$LATEST_PYPY_27"
|
|
assertCapturedSuccess
|
|
fi
|
|
}
|
|
|
|
pushd $(dirname 0) >/dev/null
|
|
popd >/dev/null
|
|
|
|
source $(pwd)/test/utils
|
|
source $(pwd)/test/shunit2
|