From 8b7cdfe1b5cfbf416b7ffc0d045a22144ef5cf58 Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Jul 10 2018 13:41:06 +0000 Subject: Fix %%py_byte_compile macro When invoked with a Python 2 binary it also mistakenly ran py3_byte_compile. --- diff --git a/macros.pybytecompile3.6 b/macros.pybytecompile3.6 index f319979..390d4f7 100644 --- a/macros.pybytecompile3.6 +++ b/macros.pybytecompile3.6 @@ -21,5 +21,5 @@ py3_byte_compile () {\ find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2], optimize=opt) for opt in range(2) for f in sys.argv[1:]]' || :\ }\ \ -[[ "%1" == *python3* ]] || py2_byte_compile "%1" "%2" && py3_byte_compile "%1" "%2" \ +[[ "%1" != *python3* ]] && py2_byte_compile "%1" "%2" || py3_byte_compile "%1" "%2" \ %{nil} diff --git a/python3.spec b/python3.spec index 5bdde01..bb58d2b 100644 --- a/python3.spec +++ b/python3.spec @@ -14,7 +14,7 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well Version: %{pybasever}.5 -Release: 1%{?dist} +Release: 2%{?dist} License: Python @@ -1470,6 +1470,10 @@ CheckPython optimized # ====================================================== %changelog +* Tue Jul 10 2018 Tomas Orsava - 3.6.5-2 +- Fix %%py_byte_compile macro: when invoked with a Python 2 binary it also + mistakenly ran py3_byte_compile + * Thu Mar 29 2018 Charalampos Stratakis - 3.6.5-1 - Update to 3.6.5