Adapt %%py_dist_name to keep square brackets
So %{py3_dist foo[bar]} works as expected.
Add tests.
This commit is contained in:
parent
763d24cc5c
commit
59abe832d4
3 changed files with 28 additions and 1 deletions
|
|
@ -70,7 +70,7 @@
|
|||
# Converts Python dist name to a canonical format
|
||||
%py_dist_name() %{lua:\
|
||||
name = rpm.expand("%{?1:%{1}}");\
|
||||
canonical = string.gsub(string.lower(name), "%W+", "-");\
|
||||
canonical = string.gsub(string.lower(name), "[^%w%[%]]+", "-");\
|
||||
print(canonical);\
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue