Use PEP 503 names for BuildRequires, but maintain EPEL 8 compatibility

Since Fedora 33, we generate both python3dist(foo.bar) and python3dist(foo-bar)
provides, but we'd like to follow PEP 503 and use only the names with dash.

By using the %py3_dist macro, this remains compatible with EPEL 8

Resolves: rhbz#2012298

(cherry picked from commit 2406e1f14815924cd65b4fdc3cf10c290f206a70)
This commit is contained in:
Miro Hrončok 2021-12-20 19:15:36 +01:00 committed by Rich Megginson
parent 679e17907b
commit 6576f9aa9c

View File

@ -248,7 +248,7 @@ BuildRequires: highlight
# Requirements for galaxy_transform.py
BuildRequires: python3
%if 0%{?fedora} || 0%{?rhel} >= 8
BuildRequires: python3dist(ruamel.yaml)
BuildRequires: %{py3_dist ruamel.yaml}
Requires: python3-jmespath
Requires: python3-netaddr
%else