head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2026.10.10.11.26.50; author adam; state Exp; branches; next ; commitid ojIvV7yabH8KgVYG; desc @@ 1.1 log @ibus-hangul: updated to 1.5.5 1.5.5 Change default dist file format to xz xz file format is much smaller than gz. Update the rule to generate the ChangeLog In order to generate the ChangeLog during out-of-tree builds, $(top_srcdir) is used. @ text @$NetBSD$ Fix for Python 3.12 and newer. --- py-compile.orig 2026-10-10 11:14:52.563548666 +0000 +++ py-compile @@@@ -116,7 +116,7 @@@@ $PYTHON -c " fi $PYTHON -c " -import sys, os, py_compile, imp +import sys, os, py_compile, importlib.util files = '''$files''' @@@@ -129,15 +129,12 @@@@ for file in files.split(): 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, importlib.util.cache_from_source(filepath), 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, importlib.util # pypy does not use .pyo optimization if hasattr(sys, 'pypy_translation_info'): @@@@ -153,10 +150,7 @@@@ for file in files.split(): 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, importlib.util.cache_from_source(filepath, False), path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: @