Adapt %%py_dist_name to keep square brackets

So %{py3_dist foo[bar]} works as expected.

Add tests.
This commit is contained in:
Miro Hrončok 2020-07-10 15:41:39 +02:00
commit 59abe832d4
3 changed files with 28 additions and 1 deletions

View file

@ -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);\
}