From f5f2e48e6cebd69c9c827d534d2de3dc21dc0d65 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 28 Apr 2026 10:32:22 +0100 Subject: [PATCH] Consolidate comments in the srpm macros (cherry picked from Fedora commit 31a5782ec1d1979094ab9fa6d3ea521741fb85d5) --- macros.aaa-pyproject-srpm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/macros.aaa-pyproject-srpm b/macros.aaa-pyproject-srpm index 63a0ace..ee98cf3 100644 --- a/macros.aaa-pyproject-srpm +++ b/macros.aaa-pyproject-srpm @@ -6,19 +6,17 @@ # Note: This takes arbitrary options, to ease addition of new options to the real macro. %pyproject_buildrequires(-) echo 'pyproject-rpm-macros' -# This is a backward-compatible suffix used in all pyproject-rpm-macros directories -# For the main Python it's empty, for all others it's "-3.X" +# We need to define %%pyproject_patch_dependency here in the srpm macros, along with any path-related macros it uses, +# because this macro is normally used in %%prep, before any generated BR is installed. +# - The backward-compatible %%_pyproject_files_pkgversion suffix is used in all pyproject-rpm-macros directories. +# For the main Python it's empty, for all others it's "-3.X". +# - We prefix all created files with %%_pyproject_files_prefix to make them unique. +# Ideally, we would put them into %%{buildsubdir}, but that value changes during the spec. +# The used value is similar to the one used to define the default %%buildroot. %_pyproject_files_pkgversion %{expr:"%{python3_pkgversion}" != "3" ? "-%{python3_pkgversion}" : ""} - -# We prefix all created files with this value to make them unique -# Ideally, we would put them into %%{buildsubdir}, but that value changes during the spec -# The used value is similar to the one used to define the default %%buildroot %_pyproject_files_prefix %{name}-%{version}-%{release}.%{_arch}%{_pyproject_files_pkgversion} - %_pyproject_dep_overrides %{_builddir}/%{_pyproject_files_prefix}-pyproject-dep-overrides -# We need to define this macro here in the srpm macros because it is normally -# used in %%prep, before any generated BR is installed. %pyproject_patch_dependency() %{expand:\\\ %{!?1:%{error:%%pyproject_patch_dependency requires an argument}}\\\ %{?2:%{error:%%pyproject_patch_dependency accepts exactly one argument per call}}\\\