Plugin Configuration¶
Plugin options are declared in [tool.poetry-pyinstaller-plugin] section of your pyproject.toml file.
Since release 2.x of poetry-pyinstaller-plugin all PyInstaller options are configurable at target or plugin level.
Order of precedence for options: target -> plugin -> default
Options¶
Are listed in this section, options that are only configurable at plugin level.
tool.poetry-pyinstaller-plugin.pre-build¶
Allow you to call a python function before the pyinstaller build.
For more information about Hooks you can read Reference > Hooks.
tool.poetry-pyinstaller-plugin.post-build¶
Allow you to call a python function after the pyinstaller build.
For more information about Hooks you can read Reference > Hooks.
Target Options¶
As mentioned at the beginning of this page, all target options can be defined globally at plugin level and get effective to all targets (if not overridden at target level).
Following given order of precedence: target -> plugin -> default
[tool.poetry-pyinstaller-plugin]
# Override default "onedir" build type for all targets
type = "onefile"
[tool.poetry-pyinstaller-plugin.targets.my-tool]
source = "entrypoint.py"
# Override global option 'tool.poetry-pyinstaller-plugin.type'
type = "onedir"
[tool.poetry-pyinstaller-plugin.targets.my-tool-2]
source = "entrypoint.py"
# my-tool ---> "onedir" build as set in target config
# my-tool-2 -> "onefile" build as set in plugin config