[packages/adapter: 426/631] - handle egg infos in py_sitescriptdir

glen glen at pld-linux.org
Mon Sep 12 20:10:09 CEST 2016


commit 860a6f52b4f935ac60fb039056dea0ce0c217a37
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Oct 16 21:54:01 2008 +0000

    - handle egg infos in py_sitescriptdir
    
    Changed files:
        adapter.awk -> 1.406

 adapter.awk | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index a4ec6fb..062ad16 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -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
 		}
 	}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list