On 2024-08-28 00:21:27 +0200 (+0200), Thomas Goirand wrote: [...] > Well, I don't want to just package the generated stuff, I would > prefer to have the tools to generate them myself from source at > build time. And that's what has been bothering me since the > beginning: I do not know how to do that, currently, neither for > the authorship list or the release notes. In both case, the Git > repo is needed, and that doesn't fit at all a packaging workflow, > unless I embed all of the .git folder in the source package. This > was truth in 2010, and still is in 2024... > > As a consequence, I decided not to care, as I haven't find a > solution to "build from source", so I'm not packaging release > notes and authorship list. It's probably my fault that I didn't > contribute some fixes to reno though.
For release notes, you can run `reno report` in a (non-shallow) Git checkout of any reno-using project and redirect its stdout to a file. Alternatively, PBR will call reno itself if it's found in the build environment when generating an sdist (this may require adding reno to the install_requires for the project when using build isolation). For example invoking `pyproject-build --sdist` will call SetupTools (PBR is a SetupTools plugin) to generate all of AUTHORS, ChangeLog, and RELEASENOTES.rst. Maybe pybuild from the dh-python package can do the same? But to bring the subthread back on topic, yes, all of this absolutely depends on having the Git branch history present, because the information required for all of these is the Git metadata itself. Storing another copy of the same data in flat files inside the worktree would be both duplicative and laggy, since some process would need to commit those files, and there lurks the specter of Gödel's First Incompleteness Theorem. Much in the same way Debian package maintainers have an aversion to reusing pre-generated files when they can be trivially recreated at package build time, some upstream projects have an aversion to checking generated files into version control if they can be recreated from existing contents of version control (not merely the versioned files but also the accompanying metadata). -- Jeremy Stanley
signature.asc
Description: PGP signature