Hacker News new | ask | show | jobs
by brigandish 1834 days ago
I'd plump for Macports or pkgsrc long before Homebrew.
3 comments

Homebrew should first come up with basic functionality... like you know not assuming the OS will only have one user account ever. I was quite shocked when I found this out about the oh so amazing package manager.

Before someone shares some bizarre workaround: no thanks.

The last time I bothered with it, it complained about my use of `sudo` but wouldn't run unless I was logged in as admin - not a temporary bump, just logged in as an admin. Sudo isn't alright but running as admin is…? I really can't work that one out.

It also broke so I uninstalled it. When I need to I go straight to their formulas and install by hand, as a non-admin user.

The issue (in my experience) is that neither Homebrew nor Macports provide a "full fat" package management experience like pacman or even apt. Not only are they missing packages, they're missing features and are loaded with outdated builds. If Apple made a first-party package manager that didn't suck, I'd probably have a Mac on my desk today.
Homebrew is a piece of crap. There's no away to install specific versions of software (unless you dig through the git repo and install using a commit hash). It has a scorched earth policy of wiping out dependencies willy nilly. One time I installed Python 3.8 and it wiped out the version of openssl used with Python 3.7 I used for a client project.
You can actually `brew search python@` to see the available versions (major/minor only, not patch) and then `brew install python@3.7` to install an older version. Caveat is that this depends on someone having made a separate formula, under the correct versioned naming scheme, and uploaded it to homebrew. There doesn't seem to be a python2 formula, for example.

I think it's a difference in philosophy? Brew does a "good enough" job for the most common use case, supplementing Apple's janky *nix environment with commonly-needed tools, without a built-in package manager. It doesn't try to do complex simultaneous versions... in my (admittedly limited) experience, if you need to do that, you either do that in something like a project-based setup (npm/composer) or in a VM/container with its own packages.

In your situation, when you have multiple pythons running in the same environment, how does anyone given script know which one to call? What's a better way of doing this?