pyproject-rpm-macros/macros.aaa-pyproject-srpm
Miro Hrončok ea56d1c870 Don't exit from pyproject-srpm-macros implementation of %pyproject_buildrequires
- Fixes: rhbz#2391290

Consider code like this:

    %generate_buildrequires
    mv setup.py{,.ignore}
    %pyproject_buildrequires
    mv setup.py{.ignore,}

When %pyproject_buildrequires exits, the second mv is never executed.
The next round of %generate_buildrequires will then fail.

In fact, there is probably not a good reason to call exit from %pyproject_buildrequires.

From https://src.fedoraproject.org/rpms/libcpuid/pull-request/7
2025-09-01 13:18:45 +02:00

18 lines
872 B
Plaintext

# This file is called macros.aaa-pyproject-srpm
# to sort alphabetically before macros.pyproject.
# When this file is installed but macros.pyproject is not
# this macro will cause the package with the real macro to be installed.
# When macros.pyproject is installed, it overrides this macro.
# Note: This takes arbitrary options, to ease addition of new options to the real macro.
%pyproject_buildrequires(-) echo 'pyproject-rpm-macros'
# Declarative buildsystem, requires RPM 4.20+ to work
# https://rpm-software-management.github.io/rpm/manual/buildsystem.html
# This is the minimal implementation to be in the srpm package,
# as required even before the BuildRequires are installed
%buildsystem_pyproject_conf() %nil
%buildsystem_pyproject_generate_buildrequires() %pyproject_buildrequires %*
%buildsystem_pyproject_build() %nil
%buildsystem_pyproject_install() %nil