CI: Move Homebrew dependencies into Brewfile#148335
CI: Move Homebrew dependencies into Brewfile#148335hugovk wants to merge 7 commits intopython:mainfrom
Conversation
| run: | | ||
| brew install pkg-config openssl@3.5 xz gdbm tcl-tk@9 make | ||
| # Because alternate versions are not symlinked into place by default: | ||
| brew link --overwrite tcl-tk@9 |
There was a problem hiding this comment.
Will backport to 3.10, but we still need to link tcl-tk@8 there. And put tcl-tk@8 in the Brewfile.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
webknjaz
left a comment
There was a problem hiding this comment.
I like the idea but not sure if the file location should be among the workflows.. Perhaps, it'd belong in the tools dir?
|
Good point: if we move it elsewhere, we can update https://devguide.python.org/getting-started/setup-building/ -brew install pkg-config openssl@3 xz gdbm tcl-tk mpdecimal zstd
+brew bundle --file=<file-location> |
.github/workflows/Brewfile
Outdated
| @@ -0,0 +1,6 @@ | |||
| brew "gdbm" | |||
| brew "make" | |||
There was a problem hiding this comment.
Why do we need to install a third-party make? We've always just used the Apple-supplied one as shown in the devguide.
There was a problem hiding this comment.
Hmm, let's see...
It was added in #123020 because BSD make (the macOS default) was found to have a race condition when writing output to file across multiple jobs. We needed the output file to postprocess warnings.
And GNU make (from Homebrew, executable gmake) has --output-sync which prevents this race.
See resolved comment thread at #123020 (comment).
So we can move make out of the Brewfile, because we don't want that as part of the devguide recommendation, and do keep regular brew install make on CI.
| brew "openssl@3.5" | ||
| brew "pkg-config" | ||
| brew "tcl-tk@9" | ||
| brew "xz" |
There was a problem hiding this comment.
What about mpdecimal and zstd?
There was a problem hiding this comment.
Looks like they are already part of the macOS runners, so we never had to add them.
But I'll add so we can recommend the Brewfile in the devguide.
The motivation for this is to get rid of the 15 Homebrew warnings like:
Details
macOS / build and test (macos-26)
openssl@3.5 was installed but not linked because openssl@3 and openssl@3 are already linked. To link this version, run: brew link openssl@3.5
macOS / build and test (macos-26)
$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECKis set: not checking for outdated dependents or dependents with broken linkage!macOS / build and test (macos-26)
gdbm 1.26 is already installed and up-to-date. To reinstall 1.26, run: brew reinstall gdbm
macOS / build and test (macos-26)
xz 5.8.3 is already installed and up-to-date. To reinstall 5.8.3, run: brew reinstall xz
macOS / build and test (macos-26)
pkgconf 2.5.1 is already installed and up-to-date. To reinstall 2.5.1, run: brew reinstall pkgconf
macOS (free-threading) / build and test (macos-26)
openssl@3.5 was installed but not linked because openssl@3 and openssl@3 are already linked. To link this version, run: brew link openssl@3.5
macOS (free-threading) / build and test (macos-26)
$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECKis set: not checking for outdated dependents or dependents with broken linkage!macOS (free-threading) / build and test (macos-26)
gdbm 1.26 is already installed and up-to-date. To reinstall 1.26, run: brew reinstall gdbm
macOS (free-threading) / build and test (macos-26)
xz 5.8.3 is already installed and up-to-date. To reinstall 5.8.3, run: brew reinstall xz
macOS (free-threading) / build and test (macos-26)
pkgconf 2.5.1 is already installed and up-to-date. To reinstall 2.5.1, run: brew reinstall pkgconf
openssl@3.5 was installed but not linked because openssl@3 and openssl@3 are already linked. To link this version, run: brew link openssl@3.5
macOS / build and test (macos-15-intel)
$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECKis set: not checking for outdated dependents or dependents with broken linkage!macOS / build and test (macos-15-intel)
gdbm 1.26 is already installed and up-to-date. To reinstall 1.26, run: brew reinstall gdbm
macOS / build and test (macos-15-intel)
xz 5.8.3 is already installed and up-to-date. To reinstall 5.8.3, run: brew reinstall xz
macOS / build and test (macos-15-intel)
pkgconf 2.5.1 is already installed and up-to-date. To reinstall 2.5.1, run: brew reinstall pkgconf
Before: https://github.com/python/cpython/actions/runs/24211469188
brew bundle Brewfileis essentially the same asbrew install, except it checks all the needed dependencies first, and if a dep is is already installed, it's a noop and doesn't print the warning.Docs: https://docs.brew.sh/Brew-Bundle-and-Brewfile
This helps keep our warnings log clear for things that really matter.
Also we don't need to
brew link --overwrite tcl-tk@9becausetcl-tkis the default. This fixes these three warnings:After: just a hypothesis warning! https://github.com/python/cpython/actions/runs/24248324311?pr=148335