summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}