#1379 Do not require literal `BuildRequires: python3-devel` in the specfile
Merged by james. Opened by churchyard.
churchyard/packaging-committee no_inspec  into  master

Download 1379.patch

When this rule was introduced, using BuildRequires: python3-devel was the way to:

  • pull python3-rpm-macros,
  • pull python3-rpm-generators,
  • pull pyproject-rpm-macros,
  • actually BuildRequire python3-devel.

Later, it become possible to use this to achieve the same goals:

%generate_buildrequires
%pyproject_buildrequires

This generates the same dependency and can be used out-of-the-box thanks to
pyproject-srpm-macros.

When this feature was introduced, I decided to keep the rule,
because I wanted to encourage people to explicitly keep BuildRequires: python3-devel.

However, this requirement makes the use of the RPM pyproject declarative buildsystem
a bit cumbersome.

See https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/455
and https://rpm-software-management.github.io/rpm/manual/buildsystem.html

If the specfile has:

BuildSystem: pyproject

We don't also need:

BuildRequires: python3-devel

The declarative buildsystem is not explicitly mentioned here,
as it is a provisional feature.

rebased onto ec76818f787640238f0afb6c00faf17ac40f66c1

Looks good to me. +1

I suggest dropping the word "explicitly" here, and use "build require" instead of "BuildRequire". So it would be:

*MUST* build require `+python3-devel+`,

The current wording sounds like packagers must literally have the BuildRequires directive in the spec file, while in the next sentence it's explained that the build requirement can be accomplished either with the explicit directive or with %pyproject_buildrequires. This slight adjustment would make things flow a bit better I think.

Happy to do that. I would appreciate if it was clear that build requiring it transitively is not good enough.

I'd appreciate suggestions on the exact language that allows dropping "explicitly" but makes it clear that build-requiring it transitively is not good enough.

rebased onto e94b1804588c66bced9674a7232c6c4ebebcc02f

Pull-Request has been merged by james

Follow up adjustments submitted as #1384.

Metadata