Add -f, -t, -e options to %%py_check_import macros

The options were introduced to python-rpm-macros in Fedora.
Adding them to EPEL prevents failures when processing Fedora specfiles.
The actual functionality was not backported to EPEL.
When used, the options emit warning.
epel8
Karolina Surma 3 years ago
parent 367f6266ab
commit 4ce1a695cf

@ -1,6 +1,6 @@
Name: epel-rpm-macros
Version: 8
Release: 25
Release: 26
Summary: Extra Packages for Enterprise Linux RPM macros
Group: System Environment/Base
@ -72,6 +72,9 @@ install -Dpm 644 %{SOURCE150} \
%changelog
* Wed Oct 27 2021 Karolina Surma <ksurma@redhat.com> - 8-26
- Add -t, -f, -e options to %%py_check_import which emit warning when used
* Tue Oct 26 2021 Tomas Orsava <torsava@redhat.com> - 8-25
- Define a new macros %%python_wheel_dir and %%python_wheel_pkg_prefix

@ -86,7 +86,10 @@
# try to import the given Python module(s).
# Useful as a smoke test in %%check when running tests is not feasible.
# Use spaces or commas as separators.
%py_check_import() %{expand:\\\
%py_check_import(e:tf:) %{expand:\\\
%{-e:echo 'WARNING: The -e option of %%%%py_check_import is not currently supported on EPEL.' >&2}
%{-t:echo 'WARNING: The -t option of %%%%py_check_import is not currently supported on EPEL.' >&2}
%{-f:echo 'WARNING: The -f option of %%%%py_check_import is not currently supported on EPEL.' >&2}
(cd %{_topdir} &&\\\
PATH="%{buildroot}%{_bindir}:$PATH"\\\
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}}"\\\
@ -94,7 +97,10 @@
%{__python} -c "import %{lua:local m=rpm.expand('%{?*}'):gsub('[%s,]+', ', ');print(m)}"
)
}
%py2_check_import() %{expand:\\\
%py2_check_import(e:tf:) %{expand:\\\
%{-e:echo 'WARNING: The -e option of %%%%py2_check_import is not currently supported on EPEL.' >&2}
%{-t:echo 'WARNING: The -t option of %%%%py2_check_import is not currently supported on EPEL.' >&2}
%{-f:echo 'WARNING: The -f option of %%%%py2_check_import is not currently supported on EPEL.' >&2}
(cd %{_topdir} &&\\\
PATH="%{buildroot}%{_bindir}:$PATH"\\\
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python2_sitearch}:%{buildroot}%{python2_sitelib}}"\\\
@ -102,7 +108,10 @@
%{__python2} -c "import %{lua:local m=rpm.expand('%{?*}'):gsub('[%s,]+', ', ');print(m)}"
)
}
%py3_check_import() %{expand:\\\
%py3_check_import(e:tf:) %{expand:\\\
%{-e:echo 'WARNING: The -e option of %%%%py3_check_import is not currently supported on EPEL.' >&2}
%{-t:echo 'WARNING: The -t option of %%%%py3_check_import is not currently supported on EPEL.' >&2}
%{-f:echo 'WARNING: The -f option of %%%%py3_check_import is not currently supported on EPEL.' >&2}
(cd %{_topdir} &&\\\
PATH="%{buildroot}%{_bindir}:$PATH"\\\
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}"\\\

Loading…
Cancel
Save