PyInstaller Support
Pyinstaller allows to package a python application with its dependencies in a single exe.
It is possible to package an application that is using Apprise but there is a trick.
Let’s take a simple script:
from apprise import Appriseapobj = Apprise()apobj.add('<SCHEME>://<FQDN>/<TOKEN>')apobj.notify(title="a title", body="this is the body of the notification")Then package with pytinstaller:
pyinstaller -F myscript.pyAnd launch it:
./dist/myscriptWe get:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIEbGkgo/apprise/attachment'orFileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIEbGkgo/apprise/plugins'orFileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIEbGkgo/apprise/config'We have to use --collect-all option which, according to documentation:
Collect all submodules, data files, and binaries from the specified package or module. This option can be used multiple times.
pyinstaller -F --collect-all apprise myscript.pyNo more errors, notifications are sent.