Allow multiline arguments processing for %%py3_check_import

Fixes the regression introduced with the macro reimplementation.
Resolves: rhbz#2018809
This commit is contained in:
Karolina Surma 2021-11-01 09:42:39 +01:00
commit b20d8aa23a
6 changed files with 33 additions and 14 deletions

View file

@ -79,8 +79,11 @@
PATH="%{buildroot}%{_bindir}:$PATH"\\\
PYTHONPATH="${PYTHONPATH:-%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}}"\\\
PYTHONDONTWRITEBYTECODE=1\\\
%{__python} -%{py_shebang_flags} %{_rpmconfigdir}/redhat/import_all_modules.py %{?**}
}
%{__python} -%{py_shebang_flags} %{_rpmconfigdir}/redhat/import_all_modules.py\\\
%{lua:
-- handle multiline arguments correctly, see https://bugzilla.redhat.com/2018809
local args=rpm.expand('%{?**}'):gsub("[%s\\\\]*%s+", " ");print(args)
}}
%python_provide() %{lua:
local python = require "fedora.srpm.python"