> Given that Python is a standard package and we only need that single
> shtab thing from pip, why not doing the generation during build in a
> virtual env, using a pinned version of shtab that is fetched on demand,
> maybe with the option to run in the host env if the user prefers to
> install shtab manually?

This got me thinking and I have now a version which generates the completion 
files at build time - not just in CI, but
*everywhere*, thus we don't have to put the generated files into version 
control.

> So we are replicating the command line options from the C tools in
> Python stubs - ok. But please leave a comment in the affected C files
> where the Python files should be updated as well when changing options.

Yes, initially I used a hack to generate the Python code from the C code and 
then fine-tuned the output (in particular
I have added 'choices' and shorter doc strings). This could be further 
automated if we use a custom `struct` to store the CLI
and then convert it to the structs required by argp). The process to obtain the 
completion files would then be:
"compile c helper" -> "run c helper" -> "run shtab". I guess this could also be 
integrated in the Makefile.am of patch
v3. I do wonder if it's worth the effort though, considering the seldom changes 
to the CLI.

> Why "share/"? Can't we just use completion/ as subfolder?

Yes sure, moved in v3.

> There should be a clean target for this in [share/]completion/Makefile

The Makefile is gone in v3.

-- 
Michael Adler

Siemens AG
T RDA IOT SES-DE
Otto-Hahn-Ring 6
81739 München, Deutschland

Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Jim Hagemann Snabe; 
Vorstand: Roland Busch, Vorsitzender; Klaus Helmrich, Cedrik Neike, Matthias 
Rebellius, Ralf P. Thomas, Judith Wiese; Sitz der Gesellschaft: Berlin und 
München, Deutschland; Registergericht: Berlin-Charlottenburg, HRB 12300, 
München, HRB 6684; WEEE-Reg.-Nr. DE 23691322

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20211112103337.xjrjstncoygp5jkd%40kratos.

Reply via email to