mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
This commit is contained in:
parent
78cecd2060
commit
62395cabb5
1 changed files with 17 additions and 14 deletions
|
@ -1484,6 +1484,12 @@ use_homebrew_readline() {
|
|||
fi
|
||||
}
|
||||
|
||||
prefer_openssl11() {
|
||||
# Allow overriding the preference of OpenSSL version per definition basis (#1302, #1325, #1326)
|
||||
PYTHON_BUILD_HOMEBRE_OPENSSL_FORMULA="${PYTHON_BUILD_HOMEBRE_OPENSSL_FORMULA:-openssl@1.1 openssl}"
|
||||
export PYTHON_BUILD_HOMEBRE_OPENSSL_FORMULA
|
||||
}
|
||||
|
||||
has_broken_mac_openssl() {
|
||||
is_mac || return 1
|
||||
local openssl_version="$(/usr/bin/openssl version 2>/dev/null || true)"
|
||||
|
@ -1492,20 +1498,17 @@ has_broken_mac_openssl() {
|
|||
}
|
||||
|
||||
use_homebrew_openssl() {
|
||||
local ssl11dir="$(brew --prefix openssl@1.1 2>/dev/null || true)"
|
||||
local ssl10dir="$(brew --prefix openssl 2>/dev/null || true)"
|
||||
if [ -d "$ssl11dir" ]; then
|
||||
echo "python-build: use openssl 1.1 from homebrew"
|
||||
local ssldir=$ssl11dir
|
||||
elif [ -d "$ssl10dir" ]; then
|
||||
echo "python-build: use openssl 1.0 from homebrew"
|
||||
local ssldir=$ssl10dir
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
export PKG_CONFIG_PATH="$ssldir/lib/pkgconfig/:${PKG_CONFIG_PATH}"
|
||||
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
||||
for openssl in ${PYTHON_BUILD_HOMEBRE_OPENSSL_FORMULA:-openssl}; do
|
||||
local ssldir="$(brew --prefix "${openssl}" || true)"
|
||||
if [ -d "$ssldir" ]; then
|
||||
echo "python-build: use ${openssl} from homebrew"
|
||||
export PKG_CONFIG_PATH="$ssldir/lib/pkgconfig/:${PKG_CONFIG_PATH}"
|
||||
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
||||
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
||||
return
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
build_package_mac_openssl() {
|
||||
|
|
Loading…
Reference in a new issue