diff options
author | Miro HronĨok <miro@hroncok.cz> | 2018-04-24 11:42:00 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2018-06-29 13:07:24 +0300 |
commit | 07e37f7847f039b954119b35010e02fccab9ecae (patch) | |
tree | e221bfcf12b569fb3a11b057e6d6daf0fdcf7aea /platform.in | |
parent | a288d1dc6756fdf6e4e1a501207dbd3dc2ab162c (diff) | |
download | rpm-07e37f7847f039b954119b35010e02fccab9ecae.tar.gz |
Provide a way to opt out from Python bytecompilation out side of lib dir
One can now unset %_python_bytecompile_extra (or set it to 0) to
opt out from Python bytecompilation outside of
/usr/lib(64)?/pythonX.Y.
One can also set %_python_bytecompile_extra to 1 to explicitly
opt in, even tough this is currently still the default.
Python bytecompilation of files outside of Python's own
directories (/usr/lib(64)?/pythonX.Y) with /usr/bin/python is
error prone. For context, see this Fedora change [1], it describes
all the problems and provides a longer explanation about why we
are doing this.
[1] https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation
Also adds _python_bytecompile_errors_terminate_build macro which is passed to
the brp-python-bytecompile script.
Fixes #434
(cherry picked from commit d5e599d6c9b2fc5c98cec1fccc46e2d365a06dbf)
Diffstat (limited to 'platform.in')
-rw-r--r-- | platform.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform.in b/platform.in index 9ce8c7d9d..6ccdaf23d 100644 --- a/platform.in +++ b/platform.in @@ -64,12 +64,14 @@ # %__arch_install_post @ARCH_INSTALL_POST@ +%_python_bytecompile_errors_terminate_build 0 +%_python_bytecompile_extra 1 # Standard brp-macro naming: # convert all '-' in basename to '_', add two leading underscores. %__brp_compress %{_rpmconfigdir}/brp-compress %__brp_java_gcjcompile %{_rpmconfigdir}/brp-java-bytecompile -%__brp_python_bytecompile %{_rpmconfigdir}/brp-python-bytecompile +%__brp_python_bytecompile %{_rpmconfigdir}/brp-python-bytecompile "" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}" %__brp_strip %{_rpmconfigdir}/brp-strip %{__strip} %__brp_strip_comment_note %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} %__brp_strip_shared %{_rpmconfigdir}/brp-strip-shared |