SPECS: adapter.awk - handle egg infos in py_sitescriptdir

glen glen at pld-linux.org
Thu Oct 16 23:54:07 CEST 2008


Author: glen                         Date: Thu Oct 16 21:54:07 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- handle egg infos in py_sitescriptdir

---- Files affected:
SPECS:
   adapter.awk (1.405 -> 1.406) 

---- Diffs:

================================================================
Index: SPECS/adapter.awk
diff -u SPECS/adapter.awk:1.405 SPECS/adapter.awk:1.406
--- SPECS/adapter.awk:1.405	Thu Oct 16 10:32:01 2008
+++ SPECS/adapter.awk	Thu Oct 16 23:54:01 2008
@@ -1493,17 +1493,16 @@
 	}
 
 	# 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
 		}
 	}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/adapter.awk?r1=1.405&r2=1.406&f=u



More information about the pld-cvs-commit mailing list