diff --git a/epel-rpm-macros.spec b/epel-rpm-macros.spec index fdf354a..ac377e0 100644 --- a/epel-rpm-macros.spec +++ b/epel-rpm-macros.spec @@ -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 - 8-26 +- Add -t, -f, -e options to %%py_check_import which emit warning when used + * Tue Oct 26 2021 Tomas Orsava - 8-25 - Define a new macros %%python_wheel_dir and %%python_wheel_pkg_prefix diff --git a/macros.epel-rpm-macros b/macros.epel-rpm-macros index 6c08775..58ef1ac 100644 --- a/macros.epel-rpm-macros +++ b/macros.epel-rpm-macros @@ -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}}"\\\