Skip to content

briefcase build on macOS should allow for packaging console apps as Homebrew formulae in addition to .pkg files. #2491

@glyph

Description

@glyph

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" apple/container#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.macOSThe issue relates to Apple macOS support.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions