click icon indicating copy to clipboard operation
click copied to clipboard

document how to create a standalone application

Open davidism opened this issue 1 year ago • 3 comments

Investigate and document how to package a Click project with Briefcase so that it becomes a standalone executable that does not require installing Python or dependencies.

davidism avatar Jul 31 '24 00:07 davidism

I have a click package and wanted to help, this is all I needed to do in order for me to package it with briefcase.

  • Just add Briefcase setup to the pyproject.toml
  • Create __main__.py and execute the main function in it as they rely on it.
  • Run briefcase dev -- arg1 arg2 ... to test the package.
  • Run briefcase create to download and install required packages.
  • Run briefcase package to produce the executable.

These are the changes I needed to do: https://github.com/john0isaac/markdown-checker/pull/68/files

Happy to raise a PR to document it.

john0isaac avatar Aug 11 '24 00:08 john0isaac

Sure, check out Flask's deploying docs for an idea of the format and level of detail that might be appropriate. Like those docs, we'd eventually want different pages for different common tools, such as pyinstaller or cx_freeze. Not saying you need to be the one to write all those though, I'd be happy with briefcase only at this point.

davidism avatar Aug 13 '24 03:08 davidism

In case it helps, I wrote PyApp to easily distribute Python applications (mostly CLIs) https://github.com/ofek/pyapp

ofek avatar Sep 29 '24 03:09 ofek