On Sun, Oct 29, 2023 at 2:15 PM Sandro <lists@xxxxxxxxxxxxx> wrote: > > Hi, > > During review of a package I submitted [1], the reviewer asked me to > move running an `ant` script from %prep to %build. > > However, I feel that step belongs in %prep for two reasons: > > 1. It's a preparatory step for the Python build that follows > > The `ant` job provides codec mappings (from Java Charsets), which are > subsequently used in the Python package. The process is described in the > CodecMapper README [2]. > > 2. It would be (needlessly?) more complicated to do that in %build > > I need to prep the sources and move stuff around for the Python package > to live at the top level, before calling `%pyproject_buildrequires`, > which is done before %build. > > The actual Python package, from which the PyPI sdist and wheel are > produced lives in a sub directory of the CodecMapper repository [3]. > Unfortunately, the PyPI sdist is incomplete. That's why I'm using the > GitHub sources. > > I'd appreciate any guidance with regards to permissibility and/or > alternative approaches. 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 _______________________________________________ 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