Update the build system (2)
This is the revised update to #44. The changes are now done in smaller, individual commits. Each can be reviewed independent, but they form a relation chain.
The complete PR will probably require a few rounds, as it is quite large and changes a lot. See the TODO section for open points. Nevertheless, I'm sharing this RP in this stage to get your opinion on those changes.
Goal
The goal of this PR is the overhaul the python package structure and the build process. Using a modern python build backend, the C++ rootext code is build as part of the installation of the sdist package / building a wheel.
The benefits are a much cleaner development process and skipping the need to handle the compilation by the program logic itself. It also separates better into installation / compilation and runtime errors.
Steps
- Dropping flake8 in favor of ruff (both are already configured)
- Migrate setuptools from
setup.{py,cfg}topyproject.toml - Replace versioneer with setuptools-scm to be compatible with
pyproject.tomland non setuptools based build backend - Move
hdtvtosrc/hdtvto follow the common python src-layout - Switch the build backend to
scikit-build-coreand compile the rootext C++ code when installing the sdist package / creating a wheel.
Breaking
- flake8 config is removed
- The version scheme has changed
- The
--rebuild-{sys,usr}cli option is gone / C++ compilation is done with
TODO
- Check conda, Dockerfile
- Check the distribution of sdist packages.
- Check the new version scheme is working with distribution packages
- Write a development section in the README (based on the
uvtool) - Test and adapt the GitHub workflows
- Fix spelling errors
Thank you for your time