mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Merge pull request #3311 from native-api/fiz_zlib_homebrew
Prefer ZLib from Homebrew/MacPorts if present; Fix using Zlib from Homebrew
This commit is contained in:
2
.github/workflows/macos_build.yml
vendored
2
.github/workflows/macos_build.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
# python-version: ${{ matrix.python-version }}
|
# python-version: ${{ matrix.python-version }}
|
||||||
# ... but in the repo, we want to test pyenv builds on macOS
|
# ... but in the repo, we want to test pyenv builds on macOS
|
||||||
- run: |
|
- run: |
|
||||||
brew install openssl readline sqlite3 xz zlib
|
brew install openssl readline sqlite3 xz tcl-tk@8 libb2 zstd
|
||||||
# https://github.com/pyenv/pyenv#installation
|
# https://github.com/pyenv/pyenv#installation
|
||||||
- run: pwd
|
- run: pwd
|
||||||
- env:
|
- env:
|
||||||
|
|||||||
@@ -863,7 +863,7 @@ build_package_standard_build() {
|
|||||||
use_homebrew_readline || true
|
use_homebrew_readline || true
|
||||||
use_homebrew_ncurses || true
|
use_homebrew_ncurses || true
|
||||||
if is_mac -ge 1014; then
|
if is_mac -ge 1014; then
|
||||||
use_xcode_sdk_zlib || use_homebrew_zlib || true
|
use_homebrew_zlib || use_xcode_sdk_zlib || true
|
||||||
else
|
else
|
||||||
use_homebrew_zlib || true
|
use_homebrew_zlib || true
|
||||||
fi
|
fi
|
||||||
@@ -873,7 +873,7 @@ build_package_standard_build() {
|
|||||||
use_macports_readline || true
|
use_macports_readline || true
|
||||||
use_macports_ncurses || true
|
use_macports_ncurses || true
|
||||||
if is_mac -ge 1014; then
|
if is_mac -ge 1014; then
|
||||||
use_xcode_sdk_zlib || use_macports_zlib || true
|
use_macports_zlib || use_xcode_sdk_zlib || true
|
||||||
else
|
else
|
||||||
use_macports_zlib || true
|
use_macports_zlib || true
|
||||||
fi
|
fi
|
||||||
@@ -1820,7 +1820,8 @@ use_homebrew_zlib() {
|
|||||||
local brew_zlib="$(brew --prefix zlib 2>/dev/null || true)"
|
local brew_zlib="$(brew --prefix zlib 2>/dev/null || true)"
|
||||||
if [ -d "$brew_zlib" ]; then
|
if [ -d "$brew_zlib" ]; then
|
||||||
echo "python-build: use zlib from homebrew"
|
echo "python-build: use zlib from homebrew"
|
||||||
export CFLAGS="-I${brew_zlib} ${CFLAGS}"
|
export CPPFLAGS="-I${brew_zlib}/include${CPPFLAGS:+ ${CPPFLAGS}}"
|
||||||
|
export LDFLAGS="-L${brew_zlib}/lib${LDFLAGS:+ ${LDFLAGS}}"
|
||||||
lock_in homebrew
|
lock_in homebrew
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user