Tooling
At some point, you may want to share the awesome application that you built with XiBIF with your friends or colleagues. Packaging your application into an installer makes it easy for others to install and use your software without needing to set up the development environment or dependencies manually.
We recommend using pyinstaller to create standalone executables for your XiBIF application.
Hooks
Pyinstaller needs to know about the hidden imports used by XiBIF. If you don’t add any weird pacakge yourself, you’ll need two hooks to make it work. It is important that you create one file per hook, and that the filenames start with “hook-” and are followed by the package name. For XiBIF, you need the following two files:
# hook-sentry_sdk.py
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = collect_submodules("sentry_sdk")
# hook-xibif.py
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = collect_submodules('xibif')
To create an executable for your XiBIF application, you can then run the following command:
pyinstaller --onefile --additional-hooks-dir=<hooks-dir> <your-script>