Skip to content

boot_timings: refactor to a src-layout

boot_timings: refactor to a src-layout

Move to a src-layout. The project is boot_timmings and has two modules cli (formerly boot_timings.py) and chart (formerly boot_log_chart). Arguably, the cli should be split between time management, parsing and actual cli functions.

Trying to follow the packaging guidelines for Python more or less warrant the use of a packaging tool. It looks like setuptools is maintained, widely used and well documented so I picked that one.

One limitation became apparent though, the layout of the project matters and it would be nice to use entry_points and not have to do things manually. So CLI have to be functions and not top-level scripts.

Hence, refactor the project for that purpose with two modules in one package.

Finally setup.py is not recommended anymore, but I am hitting an issue (likely) when using pyproject.toml on CS9 where setuptools is not using the package metadata correctly (marked UKNOWN-0.0.0). Using setup.py works on the other hand, both on CS9 and Fedora (not sure why, it does something like --no-use-pep517 maybe?).

Signed-off-by: Eric Chanudet echanude@redhat.com

Edited by Eric Chanudet

Merge request reports