Skip to content

Conversation

@daeho-ro
Copy link
Contributor

@daeho-ro daeho-ro commented Aug 24, 2025

Improve homebrew installed python detection.

This will detect the users that not only arm macos users but also intel macos users. And even if user change their homebrew prefix, this could catch them and use the path for that. I am not pretending to get the 100% users but just increase the chance of this.

Well, there is another option that just use HOMEBREW_PREFIX directly. But it depends on the user configuration and system so I didn't tried.

Here is my local output with homebrew installed python.

python3.12 -c "import sys; print(sys.prefix)"
/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.12
python3.13 -c "import sys; print(sys.prefix)"
/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.13

Copy link
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

Let's add test please to defend against regressions.

@daeho-ro
Copy link
Contributor Author

@gaborbernat Added some tests !

@gaborbernat gaborbernat merged commit c945a28 into tox-dev:main Aug 26, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants