Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/avahi: fix python install issue
@ 2024-08-17 13:18 Waldemar Brodkorb
  2024-08-18  9:23 ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Waldemar Brodkorb @ 2024-08-17 13:18 UTC (permalink / raw)
  To: buildroot

Since the update of Python to 3.12.4 in commit
76cd14167f5eb3ffe22e131ddbbecf9bc61f2ef1 avahi fails to install
python subcomponents. The reason is that the obsolete imp
python modul is used. Add a patch to remove the imp dependency.

Fixes:
 - http://autobuild.buildroot.net/results/2bf/2bf391b93362204917a560705bc402585334ab3c

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 .../0002-remove-imp-from-py-compile.patch     | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 package/avahi/0002-remove-imp-from-py-compile.patch

diff --git a/package/avahi/0002-remove-imp-from-py-compile.patch b/package/avahi/0002-remove-imp-from-py-compile.patch
new file mode 100644
index 0000000000..37534a3f7a
--- /dev/null
+++ b/package/avahi/0002-remove-imp-from-py-compile.patch
@@ -0,0 +1,50 @@
+Remove optional imp python module dependency.
+
+Upstream already removed py-compile entirely in their git repository,
+so the patch is not appropiate for upstream.
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Upstream: not appropiate
+
+diff -Nur avahi-0.8.orig/py-compile avahi-0.8/py-compile
+--- avahi-0.8.orig/py-compile	2020-02-18 07:58:21.192417644 +0100
++++ avahi-0.8/py-compile	2024-08-17 15:03:07.328733849 +0200
+@@ -116,7 +116,7 @@
+ fi
+ 
+ $PYTHON -c "
+-import sys, os, py_compile, imp
++import sys, os, py_compile
+ 
+ files = '''$files'''
+ 
+@@ -129,15 +129,12 @@
+ 	    continue
+     sys.stdout.write(file)
+     sys.stdout.flush()
+-    if hasattr(imp, 'get_tag'):
+-        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
+-    else:
+-        py_compile.compile(filepath, filepath + 'c', path)
++    py_compile.compile(filepath, filepath + 'c', path)
+ sys.stdout.write('\n')" || exit $?
+ 
+ # this will fail for python < 1.5, but that doesn't matter ...
+ $PYTHON -O -c "
+-import sys, os, py_compile, imp
++import sys, os, py_compile
+ 
+ # pypy does not use .pyo optimization
+ if hasattr(sys, 'pypy_translation_info'):
+@@ -153,10 +150,7 @@
+ 	    continue
+     sys.stdout.write(file)
+     sys.stdout.flush()
+-    if hasattr(imp, 'get_tag'):
+-        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
+-    else:
+-        py_compile.compile(filepath, filepath + 'o', path)
++    py_compile.compile(filepath, filepath + 'o', path)
+ sys.stdout.write('\n')" 2>/dev/null || :
+ 
+ # Local Variables:
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-18 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-17 13:18 [Buildroot] [PATCH] package/avahi: fix python install issue Waldemar Brodkorb
2024-08-18  9:23 ` Yann E. MORIN
2024-08-18 10:11   ` Waldemar Brodkorb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox