Enable strict python bytecompile mode (if rpm supports it)
- with %_python_bytecompile_errors_terminate_build set to non-zero, byte-compilation errors will abort the build, this helps catch out silly "improt foo" syntax errors early on - not all .py files are valid python (they can be templates, inteded for jython consumption etc), and what's valid can depend on the python version (notably 2.x vs 3.x) so allow overriding from spec
This commit is contained in:
parent
2e8b67dd78
commit
7cf1ad2dbb
6
macros
6
macros
@ -95,7 +95,7 @@
|
||||
%{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
|
||||
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
||||
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
||||
/usr/lib/rpm/brp-python-bytecompile %{__python} \
|
||||
/usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \
|
||||
/usr/lib/rpm/redhat/brp-python-hardlink \
|
||||
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
|
||||
%{nil}
|
||||
@ -167,6 +167,10 @@ unset DISPLAY\
|
||||
# Should unpackaged files in a build root terminate a build?
|
||||
%_unpackaged_files_terminate_build 1
|
||||
|
||||
#
|
||||
## Should python bytecompilation errors terminate a build?
|
||||
%_python_bytecompile_errors_terminate_build 1
|
||||
|
||||
# Use SHA-256 for FILEDIGESTS instead of default MD5
|
||||
%_source_filedigest_algorithm 8
|
||||
%_binary_filedigest_algorithm 8
|
||||
|
Loading…
Reference in New Issue
Block a user