Skip to main content

applecrate: A Python package for creating macOS installer packages.

Project description

AppleCrate

Package your command line tools into a native macOS installer.

AppleCrate is a tool for creating native macOS installers for your command line tools. It's useful for creating installers for command line tools written in any language. Tools written in interpreted languages like Python will need to be first processed with a tool like pyinstaller to create a standalone executable.

Installation

pip install applecrate

Simple Example

applecrate build --app mytool --version 1.0.0 --license LICENSE --install dist/mytool "/usr/local/bin/{{ app }}-{{ version }}" --link /usr/local/bin/mytool "/usr/local/bin/{{ app }}-{{ version }}"

This will create a native macOS installer for the tool dist/mytool and install it to /usr/local/bin/mytool-1.0.0. It will create a symlink to the tool at /usr/local/bin/mytool and will also create an uninstaller to remove the tool.

Usage

Usage: applecrate build [OPTIONS]

  applecrate: A Python package for creating macOS installer packages.

Options:
  -a, --app TEXT                  App name
  -v, --version TEXT              App version
  -l, --license FILE              Path to license file
  -w, --welcome PATH              Path to welcome markdown or HTML file
  -c, --conclusion PATH           Path to conclusion markdown or HTML file
  -u, --uninstall FILE            Path to uninstall script; if not provided, an
                                  uninstall script will be created for you.See
                                  also '--no-uninstall'
  -U, --no-uninstall              Do not include an uninstall script in the
                                  package
  -L, --url NAME URL              Links to additional resources to include in
                                  conclusion HTML shown after installation. For
                                  example, the project website or documentation.
  -b, --banner FILE               Path to optional PNG banner image for
                                  installer package.
  -i, --install FILE_OR_DIR DEST  Install FILE_OR_DIR to destination DEST; DEST
                                  must be an absolute path, for example
                                  '/usr/local/bin/app'. DEST may include
                                  template variables {{ app }} and {{ version
                                  }}. For example: `--install dist/app
                                  "/usr/local/bin/{{ app }}-{{ version }}"` will
                                  install the file 'dist/app' to
                                  '/usr/local/bin/app-1.0.0' if --app=app and
                                  --version=1.0.0.
  -k, --link SRC TARGET           Create a symbolic link from SRC to DEST after
                                  installation. SRC and TARGET must be absolute
                                  paths and both may include template variables
                                  {{ app }} and {{ version }}. For example:
                                  `--link "/Library/Application Support/{{ app
                                  }}/{{ version }}/app" "/usr/local/bin/{{ app
                                  }}-{{ version }}"`
  -p, --pre-install FILE          Path to pre-install shell script; if not
                                  provided, a pre-install script will be created
                                  for you.
  -P, --post-install FILE         Path to post-install shell script; if not
                                  provided, a post-install script will be
                                  created for you.
  --help                          Show this message and exit.

To Do

  • Add support for signing the installer with a developer certificate
  • Add support for notarizing the installer
  • Add python API to create installers programmatically
  • Add applecrate init command to create a TOML configuration via a wizard
  • Add applecrate check command to check the configuration without building the installer
  • Documentation
  • Tests

Credits

Heavily inspired by macOS Installer Buidler by Kosala Herath. AppleCrate is a complete rewrite in Python but borrows many ideas from macOS Installer Builder and is thus licensed under the same Apache License, Version 2.0.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

applecrate-0.0.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

applecrate-0.0.1-py2.py3-none-any.whl (17.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file applecrate-0.0.1.tar.gz.

File metadata

  • Download URL: applecrate-0.0.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for applecrate-0.0.1.tar.gz
Algorithm Hash digest
SHA256 6a3ee76ee199d8e8e0fff37661902ecbd8fb8ce1b40455d324e2fe8998016de2
MD5 8fa85e0808d8ee0bfdc8f74dd85c997c
BLAKE2b-256 cc73a763ace80a33c4c3302530ddba919f9005f940c51edd2910d38c7f2f5d7a

See more details on using hashes here.

File details

Details for the file applecrate-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: applecrate-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for applecrate-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c6fd8be81d6bcc84b49b3436805480e0a1edf79e84a5caef9e54f1eeea2d6403
MD5 0871084c1350657205b1f1bf7011e6a2
BLAKE2b-256 f4fba15f55b46f4422b0e15bad720d531035ce18e0a8cc5c9ddf42234e02d369

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page