diff --git a/epel-rpm-macros.spec b/epel-rpm-macros.spec index 8efc14d..f02234e 100644 --- a/epel-rpm-macros.spec +++ b/epel-rpm-macros.spec @@ -62,6 +62,7 @@ install -Dpm 644 %{SOURCE3} \ %changelog * Sun Jun 07 2020 Miro HronĨok - 8-12 - Backport %%py_shebang_fix, %%pytest, %%py_provides +- Allow to combine %%pycached with other macros (e.g. %%exclude or %%ghost) (#1838992) * Thu Apr 30 2020 Troy Dawson - 8-11 - Install python36-rpm-macros or python38-rpm-macros correctly diff --git a/macros.epel-rpm-macros b/macros.epel-rpm-macros index 770dc05..3aa950c 100644 --- a/macros.epel-rpm-macros +++ b/macros.epel-rpm-macros @@ -38,7 +38,7 @@ # This only supports Python 3.5+ and will never work with Python 2. # Hence, it has no Python version in the name. %pycached() %{lua: - path = rpm.expand("%{?1}") + path = rpm.expand("%{?*}") if (string.sub(path, "-3") ~= ".py") then rpm.expand("%{error:%%pycached can only be used with paths explicitly ending with .py}") else