From c7d6417a3bea252aa2ec9f338c15937ce2e2dc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 28 May 2018 14:23:48 +0200 Subject: [PATCH] Add a possibility to opt-out form automagic Python bytecompilation That is, outside of Python specific directories. More at https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation --- macros | 4 +++- redhat-rpm-config.spec | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/macros b/macros index 548c52e..6a81518 100644 --- a/macros +++ b/macros @@ -141,7 +141,7 @@ %__brp_strip /usr/lib/rpm/brp-strip %{__strip} %__brp_strip_comment_note /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} %__brp_strip_static_archive /usr/lib/rpm/brp-strip-static-archive %{__strip} -%__brp_python_bytecompile /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} +%__brp_python_bytecompile /usr/lib/rpm/brp-python-bytecompile "%{__python}" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}" %__brp_python_hardlink /usr/lib/rpm/brp-python-hardlink # __brp_mangle_shebangs_exclude - shebangs to exclude # __brp_mangle_shebangs_exclude_file - file from which to get shebangs to exclude @@ -183,6 +183,8 @@ # ## Should python bytecompilation errors terminate a build? %_python_bytecompile_errors_terminate_build 1 +## Should python bytecompilation compile outisde python specific directories? +%_python_bytecompile_extra 1 # Use SHA-256 for FILEDIGESTS instead of default MD5 %_source_filedigest_algorithm 8 diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 955f866..f5c614d 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 111 +Version: 112 Release: 1%{?dist} # No version specified. License: GPL+ @@ -184,6 +184,10 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Mon May 28 2018 Miro HronĨok - 112-1 +- Add a possibility to opt-out form automagic Python bytecompilation + https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation + * Wed May 02 2018 Peter Jones - 111-1 - brp-mangle-shebangs: add %%{__brp_mangle_shebangs_exclude_file} and %%{__brp_mangle_shebangs_exclude_from_file} to allow you to specify files