On 10/31/23 10:05, Pavel Raiskup wrote: > On pondělí 30. října 2023 13:30:56 CET Ben Beasley wrote: >> 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”. > > This is a confusing argument. You don't need to run %prep > to generate SRPM. > > Pavel > >> 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. If the dependencies are specified, ant can be moved to the build portion. Packaging guidelines do indicate that automatically generated BuildRequires should be done when possible, but not a must. Running commands such as %configure or %autogen in the prep section can sometimes fail. Java guidelines also indicate that ant should be run in the build section. The dependencies in this case are not to large. The package is on pypi but does not have a source distribution[1] The java program[2] used could be converted to a Python/Perl/bash script so that compilation is not required in the prep stage. If it is common to generate Python scripts for a package, probably the new %conf section should be used provided the package is only needed on newer Fedora releases. One might also want to package the java program first, and then add it in the build requires as a bootstrap dependency. 1) https://pypi.org/project/ebcdic/#files 2) https://github.com/roskakori/CodecMapper/blob/master/source/at/roskakori/codecmapper/CodecMapper.java _______________________________________________ packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue