This API is not finalised, and may change in a patch version.


Provides the ability to generate executable launcher scripts, that are based on simple_launcher. A description of how these scripts work is available in simple_launcher’s README.

class installer.scripts.InvalidScript

Raised if the user provides incorrect script section or kind.

__init__(*args, **kwargs)
class installer.scripts.Script

Describes a script based on an entry point declaration.

__init__(name, module, attr, section)

Construct a Script object.

  • name (str) – name of the script

  • module (str) – module path, to load the entry point from

  • attr (str) – final attribute access, for the entry point

  • section (str) – Denotes the “entry point section” where this was specified. Valid values are "gui" and "console".

Return type:


generate(executable, kind)

Generate a launcher for this script.

  • executable (str) – Path to the executable to invoke.

  • kind (str) – Which launcher template should be used. Valid values are "posix", "win-ia32", "win-amd64" and "win-arm".


InvalidScript – if no appropriate template is available.


The name and contents of the launcher file.

Return type:

Tuple[str, bytes]