mirror of
https://github.com/pyenv/pyenv.git
synced 2025-01-24 02:43:00 +00:00
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:
parent
cd5522965b
commit
4456e64c89
1 changed files with 7 additions and 1 deletions
|
@ -1707,7 +1707,7 @@ verify_python() {
|
||||||
try_python_module() {
|
try_python_module() {
|
||||||
if ! "$PYTHON_BIN" -c "import $1" 1>/dev/null 2>&1; then
|
if ! "$PYTHON_BIN" -c "import $1" 1>/dev/null 2>&1; then
|
||||||
{ colorize 1 "WARNING"
|
{ 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
|
return 0
|
||||||
} >&3
|
} >&3
|
||||||
fi
|
fi
|
||||||
|
@ -1788,9 +1788,14 @@ build_package_verify_py27() {
|
||||||
build_package_verify_py30() {
|
build_package_verify_py30() {
|
||||||
verify_python "${2:-3.0}"
|
verify_python "${2:-3.0}"
|
||||||
try_python_module "bz2" "bzip2 lib"
|
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"
|
try_python_module "readline" "GNU readline lib"
|
||||||
verify_python_module "ssl" "OpenSSL lib"
|
verify_python_module "ssl" "OpenSSL lib"
|
||||||
try_python_module "sqlite3" "SQLite3 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"
|
verify_python_module "zlib" "zlib"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1807,6 +1812,7 @@ build_package_verify_py32() {
|
||||||
# Post-install check for Python 3.3.x
|
# Post-install check for Python 3.3.x
|
||||||
build_package_verify_py33() {
|
build_package_verify_py33() {
|
||||||
build_package_verify_py32 "$1" "${2:-3.3}"
|
build_package_verify_py32 "$1" "${2:-3.3}"
|
||||||
|
try_python_module "lzma" "lzma lib"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Post-install check for Python 3.4.x
|
# Post-install check for Python 3.4.x
|
||||||
|
|
Loading…
Reference in a new issue