]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- handle egg infos in py_sitescriptdir
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 16 Oct 2008 21:54:01 +0000 (21:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    adapter.awk -> 1.406

adapter.awk

index a4ec6fb8abf0d1dd7ef74a1fa34f5c6c3565f242..062ad169551f9d99e2fa143108312caa3c481fc9 100644 (file)
@@ -1493,17 +1493,16 @@ function use_files_macros(      i, n, t, a, l)
        }
 
        # 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
                }
        }
This page took 0.034571 seconds and 4 git commands to generate.