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

shiboken configuration failure: ImportError: No module named utils

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 5.9
    • Shiboken
    • None
    • d5f650771cda6587f140dd15b6768188fb3ea347

    Description

      With branch 5.9 (did not test other branches), on Linux:

       

      ...

      – Detecting CXX compiler ABI info - done
      – Detecting CXX compile features
      – Detecting CXX compile features - done
      – Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.14", minimum required is "2")
      – Found PythonLibs: /usr/lib/libpython2.7.so (found suitable version "2.7.14", minimum required is "2")
      PYTHON_ARCH: 64
      Traceback (most recent call last):
      File "<string>", line 5, in <module>
      ImportError: No module named utils
      LLVM_CONFIG:
      CMake Error at CMakeLists.txt:76 (message):
      Unable to detect CLANG location by checking LLVM_INSTALL_DIR,
      CLANG_INSTALL_DIR or running llvm-config.

      – Configuring incomplete, errors occurred!

       

      The script utils.py is located in /build_scripts subdirectory and out of PYTHONPATH reach,

      if I copy utils.py to the root of the sources the configuration succeeds.

       

      Here is where this import happens in shiboken, we see that the scripts must be in the top source dir:

       

      macro(get_llvm_config)
      execute_process(
      COMMAND ${PYTHON_EXECUTABLE} -c "if True:
      import os
      import sys
      sys.path.append(os.path.realpath(os.path.join('${CMAKE_CURRENT_LIST_DIR}', '..', '..')))
      from utils import findLlvmConfig
      llvmConfig = findLlvmConfig()
      if llvmConfig:
      print(llvmConfig)
      "
      OUTPUT_VARIABLE LLVM_CONFIG
      OUTPUT_STRIP_TRAILING_WHITESPACE)
      message("LLVM_CONFIG: " ${LLVM_CONFIG})
      endmacro()

       

       

       

       

       

       

       

      Attachments

        Activity

          People

            alexandru.croitor Alexandru Croitor
            jschueller Julien Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: