|
I currently have the following set up [tool.poe.tasks.build]
help = "Build into an executable using Nuitka"
sequence = [
{ cmd = "docs/scripts/pre_nuitka_build.py" },
{ cmd = 'nuitka --lto=${lto} --mode=${mode} --report=${report} src/rovr ${args}"' },
]
args = [
{ name = "mode", help = "Build mode: onefile (default) or standalone", default = "onefile", positional = true, choices = ["standalone", "onefile"] },
{ name = "lto", help = "Enable LTO (doesn't work with zig)", default = "yes", choices = ["yes", "no"], options = ["--lto"] },
{ name = "report", help = "Where to output the Nuitka report", default = "report.xml", options = ["--report"] },
{ name = "args", help = "Additional arguments to pass to nuitka (optional)", type = "string", positional = true, required = false, multiple = true }
]but for some reason, it doesnt seem to work if i do something like |
Replies: 1 comment
|
Hi @NSPC911, The issue is that before version 0.45.0 there was no way to pass extra undeclared arguments to subtasks of a sequence task, you would need to explicitly declare However since 0.45.0 you can now pass the extra arguments from the CLI as So in your example you should be able to get what you want with: sequence = [
{ cmd = "docs/scripts/pre_nuitka_build.py" },
{ cmd = 'nuitka --lto=${lto} --mode=${mode} --report=${report} src/rovr ${POE_EXTRA_ARGS}' },
]
args = [
{ name = "mode", help = "Build mode: onefile (default) or standalone", default = "onefile", positional = true, choices = ["standalone", "onefile"] },
{ name = "lto", help = "Enable LTO (doesn't work with zig)", default = "yes", choices = ["yes", "no"], options = ["--lto"] },
{ name = "report", help = "Where to output the Nuitka report", default = "report.xml", options = ["--report"] },
]And calling poe build -- --full-compat |
Hi @NSPC911,
The issue is that before version 0.45.0 there was no way to pass extra undeclared arguments to subtasks of a sequence task, you would need to explicitly declare
full_compatas an arg on the sequence task in order to forward it to nuitka in the cmd.However since 0.45.0 you can now pass the extra arguments from the CLI as
$POE_EXTRA_ARGS, which includes any arguments after--in case named args are declared.So in your example you should be able to get what you want with: