-
Bug
-
Resolution: Done
-
Major
-
None
-
2.0.0.TP3
-
None
-
False
-
False
-
undefined
-
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 Bytecompiling .py files below /home/jenkins/workspace/rh-qpid-dispatch-dist-el7-main/build/BUILDROOT/qpid-dispatch-1.18.0-0.1037.ac3decb6.el7_9.x86_64/usr/lib/python3.6 using /usr/bin/python3.6 Compiling /home/jenkins/workspace/rh-qpid-dispatch-dist-el7-main/build/BUILDROOT/qpid-dispatch-1.18.0-0.1037.ac3decb6.el7_9.x86_64/usr/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema_doc.py ... File "/usr/lib/qpid-dispatch/python/qpid_dispatch_internal/management/schema_doc.py", line 37 print(message, file=sys.stderr) ^ SyntaxError: invalid syntax Compiling /home/jenkins/workspace/rh-qpid-dispatch-dist-el7-main/build/BUILDROOT/qpid-dispatch-1.18.0-0.1037.ac3decb6.el7_9.x86_64/usr/lib/qpid-dispatch/tests/system_tests_websockets.py ... File "/usr/lib/qpid-dispatch/tests/system_tests_websockets.py", line 47 cls.router: Qdrouterd = cls.tester.qdrouterd('A', config, wait=True, expect=Process.EXIT_OK) ^ SyntaxError: invalid syntax error: Bad exit status from /var/tmp/rpm-tmp.aw8xfP (%install)
This appears to be caused by the way bytecompilation works https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation#Status_quo
The fix would appear to be to set the following. Maybe a more elegant fix is possible. Redefining %{__python} to %{__python3}, probably, as the fedora page says.
%global __python python3