[packages/adapter: 424/631] - handle python egg-infos in filelists
glen
glen at pld-linux.org
Mon Sep 12 20:09:59 CEST 2016
commit 23e0529ef4254f8c6716ea14fc44f12752251232
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Thu Oct 16 08:31:18 2008 +0000
- handle python egg-infos in filelists
Changed files:
adapter.awk -> 1.404
adapter.awk | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/adapter.awk b/adapter.awk
index 081317d..24b571e 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -95,6 +95,7 @@ BEGIN {
"rpm --eval %py_sitescriptdir 2>/dev/null" | getline py_sitescriptdir
"rpm --eval %py_sitedir 2>/dev/null" | getline py_sitedir
"rpm --eval %py_scriptdir 2>/dev/null" | getline py_scriptdir
+ "rpm --eval %py_ver 2>/dev/null" | getline py_ver
"rpm --eval %ruby_archdir" | getline ruby_archdir
"rpm --eval %ruby_ridir" | getline ruby_ridir
@@ -1365,7 +1366,7 @@ function isort(A,n, i,j,hold) {
}
-function use_files_macros( i, n, t, a)
+function use_files_macros( i, n, t, a, l)
{
use_macros()
@@ -1491,6 +1492,22 @@ function use_files_macros( i, n, t, a)
$(NF + 1) = "# FIXME consider using %find_lang"
}
+ # python egg-infos
+ if (match($0, "^%{py_sitedir}/.*-[0-9.]+-py"py_ver".egg-info$")) {
+ l = length("%{py_sitedir}/");
+ s = substr($0, l + 1, RLENGTH - l - length("-py"py_ver".egg-info"));
+ if (match(s, "[0-9.]+$")) {
+ s = substr(s, 0, RSTART - 2);
+ print "%if \"%{py_ver}\" > \"2.4\""
+ gsub("%{py_sitedir}/.*.egg-info", "%{py_sitedir}/" s "-*.egg-info");
+ print
+ print "%endif"
+ # yeah, sorry, just can't append to preable anymore
+ print "BuildRequires:\tpython-devel >= 1:2.4"
+ next
+ }
+ }
+
# atrpms
$0 = fixedsub("%{perl_man1dir}", "%{_mandir}/man1", $0);
$0 = fixedsub("%{perl_man3dir}", "%{_mandir}/man3", $0);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885
More information about the pld-cvs-commit
mailing list