Inject SBOM into the installed wheels

This commit is contained in:
Miro Hrončok 2025-09-01 13:10:15 +02:00
commit 5d945b7395

View file

@ -302,6 +302,9 @@ BuildRequires: /usr/sbin/ifconfig
%if %{with rpmwheels}
BuildRequires: python-setuptools-wheel
BuildRequires: python-pip-wheel
%else
# For %%python_wheel_inject_sbom
BuildRequires: python-rpm-macros
%endif
@ -1563,6 +1566,11 @@ ln -s \
%{buildroot}%{_bindir}/python3-debug
%endif
%if %{without rpmwheels}
# Inject SBOM into the installed wheels (if the macro is available)
%{?python_wheel_inject_sbom:%python_wheel_inject_sbom %{buildroot}%{pylibdir}/ensurepip/_bundled/*.whl}
%endif
%if %{with flatpackage}
# Remove stuff that would conflict with python3 package
rm %{buildroot}%{_bindir}/python3