mirror of
https://github.com/apisnetworks/pyenv.git
synced 2026-11-30 19:59:01 +00:00
python-build: honor explicitly configured OpenSSL on macOS (#3541)
* python-build: probe OpenSSL from standard dependency discovery Assisted-by: OpenAI Codex Signed-off-by: Mingyang Wu <129849514+aprylewu@users.noreply.github.com>
This commit is contained in:
1 parent
eb36c1b1e8
commit
5d43b9a39d
2 files changed
+247
No files matched your search
@@ -873,6 +873,7 @@ build_package_standard_build() {
|
||||
|
||||
if [ "$package_var_name" = "PYTHON" ]; then
|
||||
if can_use_homebrew; then
|
||||
configured_with_openssl || use_homebrew_openssl || true
|
||||
use_custom_tcltk || use_homebrew_tcltk || true
|
||||
use_homebrew_readline || true
|
||||
use_homebrew_ncurses || true
|
||||
@@ -885,6 +886,7 @@ build_package_standard_build() {
|
||||
fi
|
||||
fi
|
||||
if can_use_macports; then
|
||||
configured_with_openssl || use_macports_openssl || true
|
||||
use_custom_tcltk || true
|
||||
use_macports_readline || true
|
||||
use_macports_ncurses || true
|
||||
@@ -1705,8 +1707,17 @@ build_package_mac_readline() {
|
||||
build_package_standard "$@"
|
||||
}
|
||||
|
||||
configured_with_openssl() {
|
||||
local arg
|
||||
for arg in ${CONFIGURE_OPTS} ${PYTHON_CONFIGURE_OPTS} "${PYTHON_CONFIGURE_OPTS_ARRAY[@]}"; do
|
||||
[[ "$arg" =~ ^--with-openssl(=|$) ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
has_broken_mac_openssl() {
|
||||
is_mac || return 1
|
||||
configured_with_openssl && return 1
|
||||
local openssl_version="$(/usr/bin/openssl version 2>/dev/null || true)"
|
||||
if [[ $openssl_version = "OpenSSL 0.9.8"?* || $openssl_version = "LibreSSL"* ]]; then
|
||||
if can_use_homebrew; then
|
||||
|
||||
Reference in new issue
Block a user