rpmbuild issue on CentOS7 involving python2 and brp-python-bytecompiler

Environment

CentOS7

Description

the final stage of packaging, the brp-python-bytecompiler is trying to compile a bunch of python3 code against the default /usr/bin/python which is python2 on CentOS7. Causing a flurry of errors. I've bypassed it by adding;

%global _os_install_post %(echo '%{_os_install_post}' | sed -e 's!/usr/lib[^[:space:]]/brp-python-bytecompile[[:space:]].$!!g')

as an added RPM_SPEC.

Info can be found here:
https://www.math-linux.com/linux/rpm/article/how-to-turn-off-avoid-brp-python-bytecompile-script-in-a-spec-file
https://pagure.io/packaging-committee/issue/755

Conclusion

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Compatibility

Point

Fix versions

Affects versions

Created March 31, 2021 at 7:25 PM
Updated April 1, 2021 at 3:22 PM
Resolved April 1, 2021 at 3:22 PM