Add post-install checks for curses, ctypes, lzma, and tkinter (#2353)

Tkinter check is conditional on DISPLAY

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
This commit is contained in:
Alex Hedges 2022-05-31 14:37:44 -04:00 committed by GitHub
parent cd5522965b
commit 4456e64c89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1707,7 +1707,7 @@ verify_python() {
try_python_module() {
if ! "$PYTHON_BIN" -c "import $1" 1>/dev/null 2>&1; then
{ colorize 1 "WARNING"
echo ": The Python $1 extension was not compiled. Missing the ${2:-$1}?"
echo ": The Python $1 extension was not compiled${3:+ $3}. Missing the ${2:-$1}?"
return 0
} >&3
fi
@ -1788,9 +1788,14 @@ build_package_verify_py27() {
build_package_verify_py30() {
verify_python "${2:-3.0}"
try_python_module "bz2" "bzip2 lib"
try_python_module "curses" "ncurses lib"
try_python_module "ctypes" "libffi lib"
try_python_module "readline" "GNU readline lib"
verify_python_module "ssl" "OpenSSL lib"
try_python_module "sqlite3" "SQLite3 lib"
if [[ -n $DISPLAY ]]; then
try_python_module "tkinter" "Tk toolkit" "and GUI subsystem has been detected"
fi
verify_python_module "zlib" "zlib"
}
@ -1807,6 +1812,7 @@ build_package_verify_py32() {
# Post-install check for Python 3.3.x
build_package_verify_py33() {
build_package_verify_py32 "$1" "${2:-3.3}"
try_python_module "lzma" "lzma lib"
}
# Post-install check for Python 3.4.x