Make %py3_dist respect %python3_pkgversion

By default, %{py3_dist foo} generates python3dist(foo).
This change makes it respect %python3_pkgversion so when
it is redefined as X.Y, %{py3_dist foo} generates pythonX.Y(foo).
This commit is contained in:
Lumir Balhar 2020-07-21 12:59:36 +02:00
commit 638f809f4c
3 changed files with 10 additions and 2 deletions

View file

@ -90,6 +90,7 @@
# Needs to first put all arguments into a list, because invoking a different
# macro (%py_dist_name) overwrites them
%py3_dist() %{lua:\
python3_pkgversion = rpm.expand("%python3_pkgversion");\
args = {}\
arg = 1\
while (true) do\
@ -102,7 +103,7 @@
end\
for arg, name in ipairs(args) do\
canonical = rpm.expand("%py_dist_name " .. name);\
print("python3dist(" .. canonical .. ") ");\
print("python" .. python3_pkgversion .. "dist(" .. canonical .. ") ");\
end\
}