`briefcase build` on macOS should allow for packaging console apps as Homebrew formulae in addition to `.pkg` files.
- Dominant language
- Python
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 40
Description
### What is the problem or limitation you are having?
A majority of macOS developers install their tools through Homebrew these days, but Briefcase deploys to a `.pkg` file that would be hosted on their own website. While the latter is required in some contexts, the former is what is generally culturally expected among most users of command-line tools.
### Describe the solution you'd like
I would like `briefcase build` to be able to produce one of two outputs:
1. A repository that could be pushed to github.com/(org)/homebrew-(tap) to allow for deployment to a tap, so `brew tap (org)/(tap); brew install (package)` will get users the deployed artifact
2. A pull request that could be integrated into https://github.com/Homebrew/homebrew-core so that `brew install (package)` would work without a tap.
### Describe alternatives you've considered
I can write my own formulae but that requires learning a bunch of stuff which Briefcase could potentially prevent me from learning.
### Additional context
Even famously-insular apple has noticed that Homebrew is where developers go to find their tools. When they needed to package their Game Porting Toolkit, the frontend to this was a Homebrew formula: https://github.com/apple/homebrew-apple/ When they released their first-party `container` tool, one of the first requests was "put it in Homebrew please" https://github.com/apple/container/issues/74 - and they did, even though it was already a signed `.pkg`, it still required a Homebrew frontend to behave as developers wanted.
Another advantage of distributing through Homebrew is that the CLI app participates in the usual update workflow, without requiring any code of its own to do so.
Packaging a Python application as a Homebrew formula is relatively simple, per https://docs.brew.sh/Python-for-Formula-Authors , and can be done *without* getting an apple code-signing certificate, but still presents `brew install whatever; whatever --help` as the expected culturally-legible interface for getting the "whatever" CLI tool installed on one's system, independent of its language of implementation.
Contributor guide
Research direction
Start with the macOS path for `briefcase build` and the Homebrew Python formula guidance linked in the issue. Determine whether the supported output is a tap repository, a Homebrew Core pull request, or both; done means the generated distribution can be installed with `brew install` and exposes the console app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, cli, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100