When making RPM packages, there are sometimes python programs that typically have the default behavior: When packaged, the Python script is compiled into a pyc,pyo bytecode file and placed in the RPM package, which can lead to errors in referencing missing files when packaging.
If you do not need these bytecode files, you can modify
/usr/lib/rpm/brp-python-bytecompile
Find the two commands that compile the pyc,pyo, annotate them, or exit with exit 0 directly at the beginning of the script.
Note, however, that if you have already hit the package and failed on the missing steps of the Pyc,pyo file, you may have left the files in the packaged temp directory, and you need to delete the temporary directory (usually under/var/tmp/) and then re-perform the packaging operation.
RPM package contains Python script, need to ignore PYc, PYO bytecode file