#53 Use the new brp-python-bytecompile API, allow to turn of automagic pybytecompilation
Merged 5 years ago by pmatilai. Opened 5 years ago by churchyard.
rpms/ churchyard/redhat-rpm-config f28-pybyte_new_api_properfix  into  f28

file modified
+3 -1
@@ -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 /usr/lib/rpm/redhat/brp-mangle-shebangs "%{?__brp_mangle_shebangs_exclude_from}" "%{?__brp_mangle_shebangs_exclude}"

  
@@ -179,6 +179,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

file modified
+5 -1
@@ -6,7 +6,7 @@ 

  

  Summary: Red Hat specific rpm configuration files

  Name: redhat-rpm-config

- Version: 109

+ Version: 110

  Release: 1%{?dist}

  # No version specified.

  License: GPL+
@@ -183,6 +183,10 @@ 

  %{_rpmconfigdir}/macros.d/macros.kmp

  

  %changelog

+ * Wed Dec 05 2018 Miro Hrončok <mhroncok@redhat.com> - 110-1

+ - Use the new brp-python-bytecompile API, allow to turn of automagic pybytecompilation

+   https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation

+ 

  * Thu Aug 30 2018 Fabio Valentini <decathorpe@gmail.com> - 109-1

  - Allow overriding the date in forge's dist macro.

  

RPM got updated and the brp python bytecompile script now expects another argument. The thing was intended to be backwards compatible, but apparently it isn't.

This backports the change from Fedora 29 but the default is still to bytecompile - hence it maintains the expected behavior as intended for Fedora 28 by adding an opt in option for the new behavior (opt in already in F29, default for F30+).

Reported by @mskalick - thanks.

This is a more sophisticated alternative for https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/52

Pull-Request has been merged by pmatilai

5 years ago