On 10/30/23 07:09, Fabio Valentini wrote:
Usually, steps like calling `%configure` or `%meson` SHOULD (or
must?)
happen in %build, not in `prep`. However, this is kind of a special
case, where you need to prepare the Python package in order to run
`%pyproject_buildrequires`, so by definition, it will need to happen
in `%prep`. I don't really see a way around that, other than ... not
using dynamically generated BuildRequires.
Fabio
To add to that, one of the main reasons for running things like
%configure or %meson in %build rather than %prep is to minimize the
number of dependencies for building the source RPM. It’s inconvenient to
have to install a long list of BuildRequires (on the host system rather
than just the build chroot) in order to be able to run “fedpkg srpm”.
However, I agree that anything that affects the generated BuildRequires
certainly must be run in %prep. I personally think that the
disadvantages of doing without generated BuildRequires are generally
worse than the disadvantages of having significant dependencies in
%prep, although I suppose this is open to debate.