From 4133d71acc8960c8a3ab79cf6a34c5f6cfbc2967 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Sat, 10 Nov 2018 23:35:51 +0100 Subject: [PATCH] more fun with Python byte-compilation on Fedora 28 --- gimp.spec | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gimp.spec b/gimp.spec index faa804b..20189a4 100644 --- a/gimp.spec +++ b/gimp.spec @@ -45,6 +45,17 @@ %if %{with python_separately_bytecompile} # Disable automatic compilation of Python files in extra directories %global _python_bytecompile_extra 0 + +# Don't ask ... +%if 0%{?!py_byte_compile:1} +%global py_byte_compile()\ +python_binary="%1"\ +bytecode_compilation_path="%2"\ +find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -m py_compile\ +find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -m py_compile +%endif +# ... just remove after F28 EOL + %endif # skip tests known to be problematic in a specific version @@ -77,7 +88,7 @@ Summary: GNU Image Manipulation Program Name: gimp Epoch: 2 Version: 2.10.8 -%global rel 3 +%global rel 4 Release: %{?prerelprefix}%{rel}%{dotprerel}%{dotgitrev}%{?dist} # Compute some version related macros. @@ -680,6 +691,9 @@ make check %{?_smp_mflags} %endif %changelog +* Sat Nov 10 2018 Nils Philippsen - 2:2.10.8-4 +- more fun with Python byte-compilation on Fedora 28 + * Sat Nov 10 2018 Nils Philippsen - 2:2.10.8-3 - ensure Python files are byte-compiled