Details
Description
In pysidedeploy.spec, if any of the arguments of extra_args contains a space, Nuitka will throw an error even if that argument is surrounded by quotes.
For example:
extra_args = ... --macos-app-name="App Name"
will throw an error:
FATAL: Error, specify only one positional argument unless "--run" is specified to pass them to the compiled program execution.
as it is trying to naively split the arguments by space:
subprocess.CalledProcessError: Command '[..., '--macos-app-name="App', 'Name"', ...]' returned non-zero exit status 1.
This can be fixed by replacing
extra_args = extra_args.split()
with
import shlex
extra_args = shlex.split(extra_args)
This will correctly parse the argument string and split it as if it were a real command entered on the command line, preserving quoted strings and spaces escaped with a backslash.