GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CI: Move Homebrew dependencies into Brewfile by hugovk · Pull Request #148335 · python/cpython

Conversation

@hugovk

@hugovk hugovk commented Apr 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The motivation for this is to get rid of the 15 Homebrew warnings like:

⚠️ macOS / build and test (macos-26)
[email protected] was installed but not linked because openssl@3 and openssl@3 are already linked.
To link this version, run:
brew link [email protected]

Details

macOS / build and test (macos-26)
[email protected] was installed but not linked because openssl@3 and openssl@3 are already linked. To link this version, run: brew link [email protected]
macOS / build and test (macos-26)
$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is 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)
[email protected] was installed but not linked because openssl@3 and openssl@3 are already linked. To link this version, run: brew link [email protected]
macOS (free-threading) / build and test (macos-26)
$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is 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
[email protected] was installed but not linked because openssl@3 and openssl@3 are already linked. To link this version, run: brew link [email protected]
macOS / build and test (macos-15-intel)
$HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK is 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 Brewfile is essentially the same as brew 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@9 because tcl-tk is the default. This fixes these three warnings:

macOS / build and test (macos-26)
Already linked: /opt/homebrew/Cellar/tcl-tk/9.0.3
macOS (free-threading) / build and test (macos-26)
Already linked: /opt/homebrew/Cellar/tcl-tk/9.0.3
macOS / build and test (macos-15-intel)
Already linked: /usr/local/Cellar/tcl-tk/9.0.3
macOS / build and test (macos-15-intel)

After: just a hypothesis warning! https://github.com/python/cpython/actions/runs/24248324311?pr=148335

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hugovk added 2 commits April 10, 2026 16:49
@hugovk
Move Homebrew dependencies into Brewfile
2b36429
@hugovk
No need to link the default version
301147e
@hugovk hugovk added the infra CI, GitHub Actions, buildbots, Dependabot, etc. label Apr 10, 2026
@hugovk
hugovk requested review from AA-Turner, ezio-melotti and webknjaz as code owners April 10, 2026 14:24
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 10, 2026
hugovk
hugovk commented Apr 10, 2026
View reviewed changes
Comment thread .github/workflows/reusable-macos.yml
run: |
brew install pkg-config [email protected] xz gdbm tcl-tk@9 make
# Because alternate versions are not symlinked into place by default:
brew link --overwrite tcl-tk@9

@hugovk hugovk Apr 10, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will backport to 3.10, but we still need to link tcl-tk@8 there. And put tcl-tk@8 in the Brewfile.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk hugovk added skip issue skip news labels Apr 10, 2026
hugovk
hugovk commented Apr 10, 2026
View reviewed changes
Comment thread .github/workflows/Brewfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Explicitly install tcl-tk9
f54be75
Co-authored-by: Hugo van Kemenade <[email protected]>
@hugovk hugovk added the needs backport to 3.14 bugs and security fixes label Apr 10, 2026
webknjaz
webknjaz approved these changes Apr 10, 2026
View reviewed changes

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea but not sure if the file location should be among the workflows.. Perhaps, it'd belong in the tools dir?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
@
f8abb34
@hugovk

hugovk commented Apr 10, 2026

Copy link
Copy Markdown
Member Author

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>
webknjaz reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ned-deily
ned-deily reviewed Apr 11, 2026
View reviewed changes
Comment thread .github/workflows/Brewfile Outdated
@@ -0,0 +1,6 @@
brew "gdbm"
brew "make"

@ned-deily ned-deily Apr 11, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to install a third-party make? We've always just used the Apple-supplied one as shown in the devguide.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@hugovk hugovk Apr 12, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/Brewfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

hugovk added 3 commits April 12, 2026 17:39
@hugovk
Merge remote-tracking branch 'upstream/main' into 3.15-brewfile
c37c6da
@hugovk
Only install gmake from Homebrew on CI
3a804b8
@hugovk
Add mpdecimal and zstd to Brewfile
b29865e
@hugovk hugovk mentioned this pull request Apr 20, 2026
Feature: Add Homebrew as a way to get build dependencies installed on Linux python/devguide#1791
Open
@brettcannon

brettcannon commented Apr 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There's also the potential to make this work with Linux as well (example of how to do that). The python formula has everything that's needs to be installed.

webknjaz reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon

brettcannon commented Apr 20, 2026

Copy link
Copy Markdown
Member

Back in the day this would have gone into Misc/.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Move to Misc/Brewfile
886e8b7
@hugovk

hugovk commented Apr 20, 2026

Copy link
Copy Markdown
Member Author

Moved to Misc/Brewfile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@webknjaz

webknjaz commented Apr 21, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Side note:

There's also the potential to make this work with Linux as well (example of how to do that). The python formula has everything that's needs to be installed.

Personally, I'd go for bindep (it's a tool from the OpenStack ecosystem) — my only problem with it is that it doesn't really support Windows atm.. Maybe one day I'll fix it and my https://github.com/re-actors/bindep experiment will become cross-platform.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brettcannon

brettcannon commented May 1, 2026

Copy link
Copy Markdown
Member

Personally, I'd go for bindep

The reason I suggested the options for Homebrew on Linux is:

  1. If we are going to have a Brewfile anyway, might as well maximize the utility of it
  2. I already use Homebrew on Linux 😁

But I personally have no objection against bindep.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brettcannon
brettcannon approved these changes May 1, 2026
View reviewed changes
Comment thread Misc/Brewfile Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 1, 2026
@read-the-docs-community

read-the-docs-community Bot commented May 1, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32502157 | 📁 Comparing 673a922 against main (9a1c70c)

  🔍 Preview build  

77 files changed · ± 76 modified · - 1 deleted

± Modified

  • contents.html
  • download.html
  • genindex-B.html
  • genindex-C.html
  • genindex-D.html
  • genindex-E.html
  • genindex-H.html
  • genindex-I.html
  • genindex-P.html
  • genindex-R.html
  • and 66 more...

- Deleted

  • deprecations/soft-deprecations.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
Merge branch 'main' into 3.15-brewfile
270931e
@hugovk hugovk added needs backport to 3.15 bugs and security fixes and removed needs backport to 3.14 bugs and security fixes labels May 15, 2026
@hugovk
hugovk merged commit a318a9d into python:main May 15, 2026
36 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
hugovk deleted the 3.15-brewfile branch May 15, 2026 14:03
@bedevere-app bedevere-app Bot removed the awaiting merge label May 15, 2026
@miss-islington-app

miss-islington-app Bot commented May 15, 2026

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented May 15, 2026

Copy link
Copy Markdown

GH-149882 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label May 15, 2026
@hugovk hugovk added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels May 15, 2026
@miss-islington-app

miss-islington-app Bot commented May 15, 2026

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented May 15, 2026

Copy link
Copy Markdown

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented May 15, 2026

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a318a9d8d7788fff31f05dba6d58aec676e98eb6 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned hugovk May 15, 2026
@miss-islington-app

miss-islington-app Bot commented May 15, 2026

Copy link
Copy Markdown

Sorry, @hugovk, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker a318a9d8d7788fff31f05dba6d58aec676e98eb6 3.14
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented May 15, 2026

Copy link
Copy Markdown

GH-149883 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 15, 2026
This was referenced May 15, 2026
Install Homebrew dependencies via Brewfile python/devguide#1802
Merged
[3.14] CI: Move Homebrew dependencies into Brewfile (GH-148335) #149883
Merged
@bedevere-app

bedevere-app Bot commented May 15, 2026

Copy link
Copy Markdown

GH-149884 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 15, 2026
StanFromIreland
StanFromIreland reviewed May 15, 2026
View reviewed changes
Comment thread Misc/Brewfile
brew "zstd"

brew "bzip2" if OS.linux?
brew "expat" if OS.linux?

@StanFromIreland StanFromIreland May 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why expat, since we bundle it, should it also not be an option?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@brettcannon brettcannon May 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's what Homebrew's own formula has for CPython, so I just went with it without thinking. It could probably come out in hindsight.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@brettcannon brettcannon May 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#150118

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@StanFromIreland StanFromIreland May 19, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They also pass --with-system-expat: https://github.com/Homebrew/homebrew-core/blob/bc720062efe831cb785ffd3b288b6a090ec9d2ac/Formula/p/python%403.14.rb#L136

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
hugovk added a commit that referenced this pull request May 18, 2026
@hugovk @brettcannon
[3.14] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149883
9b06672
)

Co-authored-by: Brett Cannon <[email protected]>
hugovk added a commit that referenced this pull request May 18, 2026
@hugovk @brettcannon
[3.13] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149884
419fe42
)

Co-authored-by: Brett Cannon <[email protected]>
hugovk added a commit that referenced this pull request May 22, 2026
@hugovk @brettcannon
[3.10] CI: Move Homebrew dependencies into Brewfile (GH-148335) (GH-1…
b286d98
…49884) (#149990)

Co-authored-by: Brett Cannon <[email protected]>
hugovk added a commit that referenced this pull request May 22, 2026
@miss-islington @hugovk @brettcannon
[3.12] CI: Move Homebrew dependencies into Brewfile (GH-148335) (GH-1…
7c999be
…49884) (#149988)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
hugovk added a commit that referenced this pull request May 22, 2026
@miss-islington @hugovk @brettcannon
[3.15] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149882
b79112f
)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
hugovk added a commit that referenced this pull request May 22, 2026
@miss-islington @hugovk @brettcannon
[3.11] CI: Move Homebrew dependencies into Brewfile (GH-148335) (GH-1…
a7370a9
…49884) (#149989)

Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@brettcannon brettcannon brettcannon approved these changes
@ned-deily ned-deily ned-deily left review comments
@StanFromIreland StanFromIreland StanFromIreland left review comments
@webknjaz webknjaz webknjaz approved these changes
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@hugovk hugovk

Labels

infra CI, GitHub Actions, buildbots, Dependabot, etc. skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@hugovk @brettcannon @webknjaz @ned-deily @StanFromIreland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.