}
# python egg-infos
- if (match($0, "^%{py_sitedir}/.+-[0-9.]+-py"py_ver".egg-info$")) {
- l = length("%{py_sitedir}/");
+ if (match($0, "^%{py_site(script)?dir}/.+-py"py_ver".egg-info$")) {
+ l = index($0, "/");
+ t = substr($0, 0, l - 1);
s = substr($0, l + 1, RLENGTH - l - length("-py"py_ver".egg-info"));
- if (match(s, "[0-9.]+$")) {
+ if (match(s, "[^-]+$")) {
s = substr(s, 0, RSTART - 2);
print "%if \"%{py_ver}\" > \"2.4\""
- gsub("%{py_sitedir}/.*.egg-info", "%{py_sitedir}/" s "-*.egg-info");
+ gsub(t "/.+.egg-info", t "/" s "-*.egg-info");
print
print "%endif"
- # yeah, sorry, just can't append to preable anymore
- print "BuildRequires:\tpython-devel >= 1:2.5"
next
}
}