Skip to content

How to make extensions available to hg binary #5985

Answered by gromgit
LucianU asked this question in Everyday usage

You must be logged in to vote

my hg binary installed with brew has this on the first line: #!/opt/homebrew/opt/python@3.13/bin/python3.13

That puts it in Homebrew's externally-managed Python environment, so you could just pip3 install <hg_ext_module>, but of course that would "pollute" that environment.

In case you're wondering why this is needed, some Python programs use extensions which don't come with the program, so they need to be made accessible somehow.

I'm neither Mercurial nor a Pythonista, but the fine Mercurial docs say that you can drop an extension pretty much anywhere, and just refer to it in ${HOMEBREW_PREFIX}/etc/mercurial/hg, so it seems like you don't have to "pollute" the Homebrew Python environ…

Replies: 1 comment 4 replies

You must be logged in to vote
4 replies
@LucianU

@gromgit

Answer selected by LucianU
@LucianU

@gromgit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants