Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1530

Test QtQml_listproperty: No module named 'PySide6' after installing into a buildroot

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: 6.0.2
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None

      Description

      When running the test suite after installing into a buildroot, the test suite mostly passes however QtQml_listproperty emits the error:

      [ 5815s] RUN 2: Start 411: QtQml_listproperty
      [ 5815s] RUN 2: 10/18 Test #411: QtQml_listproperty ..................***Failed 0.16 sec
      [ 5815s] RUN 2: Traceback (most recent call last):
      [ 5815s] RUN 2: File "/home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/sources/pyside6/tests/QtQml/listproperty.py", line 31, in <module>
      [ 5815s] RUN 2: from PySide6.QtCore import QObject
      [ 5815s] RUN 2: ModuleNotFoundError: No module named 'PySide6'

      If I explicitly set PYTHONPATH to include %

      {buildroot}

      %

      {python_sitearch}

      , it finds PySide6 and then fails with

      [ 2252s] RUN 5: Start 411: QtQml_listproperty
      [ 2252s] RUN 5: 8/15 Test #411: QtQml_listproperty ..................***Failed 0.19 sec
      [ 2252s] RUN 5: PySide6/_init_.py: Unable to import shiboken6 from /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/sources/pyside6/tests/QtQml, /home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-98.1.i386/usr/lib/python3.8/site-packages, /usr/lib/python38.zip, /usr/lib/python3.8, /usr/lib/python3.8/lib-dynload, /usr/lib/python3.8/site-packages, /usr/lib/python3.8/_import_failed
      [ 2252s] RUN 5: Traceback (most recent call last):
      [ 2252s] RUN 5: File "/home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/sources/pyside6/tests/QtQml/listproperty.py", line 31, in <module>
      [ 2252s] RUN 5: from PySide6.QtCore import QObject
      [ 2252s] RUN 5: File "/home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-98.1.i386/usr/lib/python3.8/site-packages/PySide6/_init_.py", line 107, in <module>
      [ 2252s] RUN 5: _setupQtDirectories()
      [ 2252s] RUN 5: File "/home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-98.1.i386/usr/lib/python3.8/site-packages/PySide6/_init_.py", line 57, in _setupQtDirectories
      [ 2252s] RUN 5: import shiboken6
      [ 2252s] RUN 5: File "/home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-98.1.i386/usr/lib/python3.8/site-packages/shiboken6/_init_.py", line 25, in <module>
      [ 2252s] RUN 5: from .shiboken6 import *
      [ 2252s] RUN 5: ImportError: libshiboken6.cpython-38-i386-linux-gnu.so.6.0: cannot open shared object file: No such file or directory

      Earlier in the log is

      [ 99s] – Installing: /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/pyside3_install/py3.8-qt6.0.2-32bit-release/lib/libshiboken6.cpython-38-i386-linux-gnu.so.6.0.2
      [ 99s] – Installing: /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/pyside3_install/py3.8-qt6.0.2-32bit-release/lib/libshiboken6.cpython-38-i386-linux-gnu.so.6.0
      [ 99s] – Installing: /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/pyside3_install/py3.8-qt6.0.2-32bit-release/lib/libshiboken6.cpython-38-i386-linux-gnu.so

      ...
      [ 101s] Copying file /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/pyside3_install/py3.8-qt6.0.2-32bit-release/lib/libshiboken6.cpython-38-i386-linux-gnu.so.6.0 to /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/build/lib.linux-i686-3.8/shiboken6/libshiboken6.cpython-38-i386-linux-gnu.so.6.0.
      [ 101s] In directory /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2:
      [ 101s] Running command: /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/patchelf --set-rpath $ORIGIN/ /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/build/lib.linux-i686-3.8/shiboken6/shiboken6.cpython-38-i386-linux-gnu.so
      [ 101s] Patched rpath to '$ORIGIN/' (Linux) or updated rpath (OS/X) in /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/build/lib.linux-i686-3.8/shiboken6/shiboken6.cpython-38-i386-linux-gnu.so.
      [ 101s] In directory /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2:
      [ 101s] Running command: /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/patchelf --set-rpath $ORIGIN/ /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/build/lib.linux-i686-3.8/shiboken6/libshiboken6.cpython-38-i386-linux-gnu.so.6.0
      [ 101s] Patched rpath to '$ORIGIN/' (Linux) or updated rpath (OS/X) in /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/build/lib.linux-i686-3.8/shiboken6/libshiboken6.cpython-38-i386-linux-gnu.so.6.0.

      ...

      [ 556s] Copying file /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/build/lib.linux-i686-3.8/shiboken6/libshiboken6.cpython-38-i386-linux-gnu.so.6.0 to /home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-99.1.i386/usr/lib/python3.8/site-packages/shiboken6/libshiboken6.cpython-38-i386-linux-gnu.so.6.0.

      Also occurs on 64 bit where the paths are /usr/lib64 (compiled modules) + /usr/lib (native python)

      [ 1102s] RUN 1: PySide6/_init_.py: Unable to import shiboken6 from /home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/sources/pyside6/tests/QtQml, /home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-102.1.s390x/usr/lib64/python3.8/site-packages, /home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-102.1.s390x/usr/lib/python3.8/site-packages, /usr/lib/python38.zip, /usr/lib64/python3.8, /usr/lib64/python3.8/lib-dynload, /usr/lib64/python3.8/site-packages, /usr/lib64/python3.8/_import_failed, /usr/lib/python3.8/site-packages
      [ 1102s] RUN 1: Traceback (most recent call last):
      [ 1102s] RUN 1: File "/home/abuild/rpmbuild/BUILD/pyside-setup-opensource-src-6.0.2/sources/pyside6/tests/QtQml/listproperty.py", line 31, in <module>
      [ 1102s] RUN 1: from PySide6.QtCore import QObject
      [ 1102s] RUN 1: File "/home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-102.1.s390x/usr/lib64/python3.8/site-packages/PySide6/_init_.py", line 107, in <module>
      [ 1102s] RUN 1: _setupQtDirectories()
      [ 1102s] RUN 1: File "/home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-102.1.s390x/usr/lib64/python3.8/site-packages/PySide6/_init_.py", line 57, in _setupQtDirectories
      [ 1102s] RUN 1: import shiboken6
      [ 1102s] RUN 1: File "/home/abuild/rpmbuild/BUILDROOT/python3-pyside2-6.0.2-102.1.s390x/usr/lib64/python3.8/site-packages/shiboken6/_init_.py", line 25, in <module>
      [ 1102s] RUN 1: from .shiboken6 import *
      [ 1102s] RUN 1: ImportError: libshiboken6.cpython-38-s390x-linux-gnu.so.6.0: cannot open shared object file: No such file or directory

      The second error, importing libshiboken6, may be a packaging error on my part, but my guess is the failure to import PySide6 in QtQml_listproperty (and no other test) suggests that this test is somehow loosing the paths to search, especially as explicitly setting PYTHONPATH bypasses the problem a bit.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            jayvdb John Vandenberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes