"Jakub Ružička" <jakub.ruzi...@nic.cz> schreef op 9 augustus 2023 17:11:15 CEST: >On 23-08-09 15:08, Colin Watson wrote: >> How will this sort of thing work when a git tree isn't necessarily >> available at binary package build time, since buildds build binary >> packages from a source package rather than directly from git and the >> source package doesn't usually include a git tree? Is it just a matter >> of causing the plugin to exist so that pybuild doesn't fail, but in >> practice the version is still going to be set by something that's >> actually in the source package? > >A primary objective is to provide the plugin so that > > python3 -m build > >works in general, not limited to package builds. > >Supporting pybuild correctly out of the box for projects using the plugin is >a next step. > >I'm not sure how it will behave when no VCS is available as in source package. > >IIRC it replaces version in pyproject.toml during build. So possibly >a mechanism that does the same during package build but from d/changelog >version might solve this... Hmmm, sounds non-trivial. > >This will certainly require some testing. >
There are already some workarounds for other similar tools in pybuild.pm, so that would be the place to add this workaround as well, if necessary. See the current examples at https://salsa.debian.org/python-team/tools/dh-python/-/blob/master/dh/pybuild.pm#L125-151 -- Groet, Regards, Victor Westerhuis -- Groet, Regards, Victor Westerhuis