Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > f079673e0342b8964ef2a1ecccbc43ae > files > 8

rpm-mageia-setup-2.79.1-1.mga10.src.rpm

--- /usr/lib/rpm/gi-find-deps.sh	2022-04-10 17:36:49.000000000 +0200
+++ ./gi-find-deps.sh	2022-06-11 11:10:01.393468382 +0200
@@ -60,7 +60,7 @@
 }
 
 function python_requires {
-	for module in $(grep -h -P "^\s*from gi\.repository import (\w+)" $1 | sed -e 's:#.*::' -e 's:raise ImportError.*::' -e 's:.*"from gi.repository import .*".*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+$::g' -e 's:\s+as\s+\w+::g' -e 's:,: :g'); do
+	for module in $(egrep -v '^{{' $1| perl -p -e 's!{{[^}]*}}!!g if /^from \S+ import/'| grep -h -P "^\s*from gi\.repository import (\w+)" | sed -e 's:#.*::' -e 's:raise ImportError.*::' -e 's:.*"from gi.repository import .*".*::' | sed -e 's,from gi.repository import,,' -r -e 's:\s+$::g' -e 's:\s+as\s+\w+::g' -e 's:,: :g'); do
 		split_name_version $module
 		print_req_prov
 		# Temporarly disabled... this is not true if the python code is written for python3... And there seems no real 'way' to identify this.