summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-25 09:10:08 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-25 09:10:08 +0000
commitf88064e2bcadfc09fd72804be041a43ade03fca6 (patch)
treed6d04aeb22ae24a4703238cc5ba697422642f94f
parentaf8a719d2a9846a288491663e367fa6484809cf8 (diff)
automatic import of kojiopeneuler23.03
-rw-r--r--koji.spec5
1 files changed, 5 insertions, 0 deletions
diff --git a/koji.spec b/koji.spec
index ff836a6..d68b8ea 100644
--- a/koji.spec
+++ b/koji.spec
@@ -4,6 +4,11 @@
%global _unpackaged_files_terminate_build 0
%define __python %{__python3}
+%define py_byte_compile() \
+python_binary="%1" \
+bytecode_compilation_path="%2" \
+[ -d $bytecode_compilation_path ] && find $bytecode_compilation_path -type f -a -name "*.py" -exec $python_binary -O -m py_compile {} \\\; \
+[ -d $bytecode_compilation_path ] && find $bytecode_compilation_path -type f -a -name "*.py" -exec $python_binary -m py_compile {} \\\;
# If the definition isn't available for python3_pkgversion, define it
%{?!python3_pkgversion:%global python3_pkgversion 3}