Uploaded image for project: 'AMQ Interconnect'
  1. AMQ Interconnect
  2. ENTMQIC-3080

Continuous productization el7 rpm build fails on Python syntax error during bytecode compile step

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 2.0.0.TP3
    • Packaging
    • None
    • False
    • False
    • undefined

      https://master-jenkins-csb-entmqcl.apps.ocp4.prod.psi.redhat.com/job/rh-qpid-dispatch-dist-el7-main/1037/console

      + /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
      

            Unassigned Unassigned
            jdanek@redhat.com Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: