Skip to content

Commit

Permalink
SWDEV-480347 - Don't terminate build for cpack bytecompile errors
Browse files Browse the repository at this point in the history
In centos-7, python2 is used for cpack bytecompile. Using f strings in code will result in syntax error.
Setting _python_bytecompile_errors_terminate_build to 0 will ignore the errors

Change-Id: I43ecc99ae16627f4f5f91d0cca0398f6a003fa3c
  • Loading branch information
raramakr authored and marifamd committed Aug 24, 2024
1 parent 9907394 commit e370dfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,11 @@ if(CPACK_RPM_PACKAGE_RELEASE)
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
endif()

# don't terminate if bytecompile of python files fails
set(CPACK_RPM_SPEC_MORE_DEFINE "%define _python_bytecompile_errors_terminate_build 0")
# Cpack converts !/usr/bin/env python3 to /usr/libexec/platform-python in RHEL8.
# prevent the BRP(buildroot policy) script from checking and modifying interpreter directives
set(CPACK_RPM_SPEC_MORE_DEFINE "%undefine __brp_mangle_shebangs")
string( APPEND CPACK_RPM_SPEC_MORE_DEFINE "\n%undefine __brp_mangle_shebangs")

# The line below doesn't currently work; it may be this issue:
# https://bugzilla.redhat.com/show_bug.cgi?id=1811358
Expand Down

0 comments on commit e370dfa

Please sign in to comment.