The parsing of configuration is currently somewhat of a mess with a mix of global an per-target configuration. A side effect of this is that the configuration format somewhat supports multiple targets, but the code only accepts a single target.
To fix this:
Create a central (data)class with all configuration of a target:
type (plugin, app)
main script
additional script
resources (aka data_files)
icon
plist
includes and excludes
bundle extension (".app" for app bundles, configurable for plugins)
...
Update the setuptools command to create an instance of this class based on its configuration (keyword arguments, py2app options, ...)
Use this instance to build the output bundle, dropping partial support for multiple targets
Actually introducing support for multiple targets can be done later, after further cleanup to the code base (#428, #431).
The parsing of configuration is currently somewhat of a mess with a mix of global an per-target configuration. A side effect of this is that the configuration format somewhat supports multiple targets, but the code only accepts a single target.
To fix this:
Create a central (data)class with all configuration of a target:
Update the setuptools command to create an instance of this class based on its configuration (keyword arguments, py2app options, ...)
Use this instance to build the output bundle, dropping partial support for multiple targets
Actually introducing support for multiple targets can be done later, after further cleanup to the code base (#428, #431).