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
This commit is contained in:
Miro Hrončok 2018-05-28 14:23:48 +02:00
parent f7e8f73ead
commit c7d6417a3b
2 changed files with 8 additions and 2 deletions

4
macros
View File

@ -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

View File

@ -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 <mhroncok@redhat.com> - 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 <pjones@redhat.com> - 111-1
- brp-mangle-shebangs: add %%{__brp_mangle_shebangs_exclude_file} and
%%{__brp_mangle_shebangs_exclude_from_file} to allow you to specify files