mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Add extra code to configure with --with-openssl
which is supported by CPython 3.7+
This commit is contained in:
parent
0708c6c968
commit
6d279501b5
1 changed files with 16 additions and 4 deletions
|
@ -1502,9 +1502,15 @@ use_homebrew_openssl() {
|
||||||
local ssldir="$(brew --prefix "${openssl}" || true)"
|
local ssldir="$(brew --prefix "${openssl}" || true)"
|
||||||
if [ -d "$ssldir" ]; then
|
if [ -d "$ssldir" ]; then
|
||||||
echo "python-build: use ${openssl} from homebrew"
|
echo "python-build: use ${openssl} from homebrew"
|
||||||
export PKG_CONFIG_PATH="$ssldir/lib/pkgconfig/:${PKG_CONFIG_PATH}"
|
if [[ -n "${PYTHON_BUILD_CONFIGURE_WITH_OPENSSL:-}" ]]; then
|
||||||
|
# configure scriopt of newer CPython versions support `--with-openssl`
|
||||||
|
# https://bugs.python.org/issue21541
|
||||||
|
package_option python configure --with-openssl="${ssldir}"
|
||||||
|
else
|
||||||
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
export CPPFLAGS="-I$ssldir/include ${CPPFLAGS}"
|
||||||
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
export LDFLAGS="-L$ssldir/lib ${LDFLAGS}"
|
||||||
|
fi
|
||||||
|
export PKG_CONFIG_PATH="$ssldir/lib/pkgconfig/:${PKG_CONFIG_PATH}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -1519,8 +1525,14 @@ build_package_mac_openssl() {
|
||||||
OPENSSLDIR="${OPENSSLDIR:-$OPENSSL_PREFIX_PATH/ssl}"
|
OPENSSLDIR="${OPENSSLDIR:-$OPENSSL_PREFIX_PATH/ssl}"
|
||||||
|
|
||||||
# Tell Python to use this openssl for its extension.
|
# Tell Python to use this openssl for its extension.
|
||||||
|
if [[ -n "${PYTHON_BUILD_CONFIGURE_WITH_OPENSSL:-}" ]]; then
|
||||||
|
# configure scriopt of newer CPython versions support `--with-openssl`
|
||||||
|
# https://bugs.python.org/issue21541
|
||||||
|
package_option python configure --with-openssl="${OPENSSL_PREFIX_PATH}"
|
||||||
|
else
|
||||||
export CPPFLAGS="-I${OPENSSL_PREFIX_PATH}/include ${CPPFLAGS}"
|
export CPPFLAGS="-I${OPENSSL_PREFIX_PATH}/include ${CPPFLAGS}"
|
||||||
export LDFLAGS="-L${OPENSSL_PREFIX_PATH}/lib ${LDFLAGS}"
|
export LDFLAGS="-L${OPENSSL_PREFIX_PATH}/lib ${LDFLAGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Make sure pkg-config finds our build first.
|
# Make sure pkg-config finds our build first.
|
||||||
export PKG_CONFIG_PATH="${OPENSSL_PREFIX_PATH}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
export PKG_CONFIG_PATH="${OPENSSL_PREFIX_PATH}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||||
|
|
Loading…
Reference in a new issue