Previous implementation allowed for only one argument to be passed to
the %pycached macro, which made it impossible to combine it with other macros.
Current implementation allows to pass other macros as arguments to
%pycached.
Example:
%pycached %exclude /path/to/foo.py
For macro expansion limitations, the opposite order is not possible.
That is to be documented in the guidelines:
https://pagure.io/packaging-committee/pull-request/986
Added some tests.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1838992
Co-authored-by: Marcel Plch <mplch@redhat.com>
This is a smallest possible backport of https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/52
Notable simplifications:
- there is no Lua library
- %python_provide remains untouched and the logic is not shared with %py_provides
- there are no pythonXY-foo provides on Fedora < 33