Skip to main content

Generate an application bundle (MacOS) from an executable

Project description

Short description

script2bundle is a command line Python script that bundles an executable, e.g. another (Python) script, into a MacOS application bundle. Compared to py2app, this is a minmal wrapper and allows editable installs (PEP660), but the application bundle will only work on the computer it was created. Script2bundle is of limited use for command line scripts, where Platypus might be a better option. It is intended to be used for GUI (e.g. Qt) executables.

How to use

Simply run the script without any options to generate an example file. Afterwards, you will find example.app in the same folder.

General options:

  • -e The filename of the (existing) executable file to be bundled.
  • -f The filename of the app to be generated (without .app).
  • -i The (existing) png file to be used to generate an icon.
  • -d The destination of the .app file: user (~/Applications), system (/Applications) or executable (same as -e).
  • --launch Launch the app to register properly.
  • --terminal Launch the app via a Terminal

Options to connect a file extension

  • -x An (app specific!) file extension to be opened by the app.
  • --CFBundleTypeRole The app’s role with respect to the file extension. Can be Editor, Viewer, Shell or None.

Additional modifier options:

The information above will be used to generate reasonable entries in Info.plist. However, these entries can be directly modified using the corresponding argument named according to the Apple documentation. The implemented options are:

  • --CFBundleDisplayName Specifies the display name of the bundle, visible to users and used by Siri.

Notes

Due to the internal structure of some entries, they have to be formatted according to RFC 1035. If neccessary, an error is raised by script2bundle, e.g. caused by two subsequent dashes in the filename.

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

script2bundle-0.3.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

script2bundle-0.3.0-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file script2bundle-0.3.0.tar.gz.

File metadata

  • Download URL: script2bundle-0.3.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for script2bundle-0.3.0.tar.gz
Algorithm Hash digest
SHA256 18a994080ab0579063a093ad02aaf3a7122f75ad4a683768d2430e2f333d5677
MD5 eb05dcfdee41be638ed574c3a3121e91
BLAKE2b-256 5f54b3ff2809baba7849378b280ef8de54798f54f44787ff386114924f9c73eb

See more details on using hashes here.

File details

Details for the file script2bundle-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for script2bundle-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8b6d286a07c65c956cc77175ea092fb6827005a0a4adf66b9051ecac2680f938
MD5 4325beba9e7d8e0dc16d58668b3a309a
BLAKE2b-256 c2694d40c7b224ffd98a7b88ee5e26eeb2217f8bd8411ef78e4e58f32ea3b007

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