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

typesystem files are rewritten in prefix

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.9, 5.11.0
    • 5.9
    • PySide
    • None
    • 76e76e679ce04c266aa7f442ae5c016ecf3c7229 (pyside-setup, 15.1.2018, 5.9)

    Description

      after commit 5d5eed53e49f4aaea85ce1638dd6fa3774a960e0 (PYSIDE-584)

      pyside tries to overwrite shiboken typesystem (xml) files in CMAKE_INSTALL_PREFIX instead of installing them:
       

      -    install(FILES $\{typesystem_files} DESTINATION share/PySide2$\{pyside2_SUFFIX}/typesystems)
      +
      +#   Copy typesystem files and remove module names from the <load-typesystem> element
      +#   so that it works in a flat directory:
      +#   <load-typesystem name="QtWidgets/typesystem_widgets.xml" ... ->
      +#   <load-typesystem name="typesystem_widgets.xml"
      +    foreach(typesystem_file $\{typesystem_files})
      +        get_filename_component(typesystem_file_name "$\{typesystem_file}" NAME)
      +        file(READ "$\{typesystem_file}" typesystemXml)
      +        string(REGEX REPLACE "<load-typesystem name=\"[^/\"]+/" "<load-typesystem name=\"" typesystemXml "$\{typesystemXml}")
      +        set(typesystem_target_file "$\{CMAKE_INSTALL_PREFIX}/share/PySide2$\{pyside2_SUFFIX}/typesystems/$\{typesystem_file_name}")
      +        file(WRITE "$\{typesystem_target_file}" "$\{typesystemXml}")
      +    endforeach()
       

      This causes a file permission error when shiboken is installed in /usr as a system package and we're trying to build pyside as user:

      CMake Error at cmake/Macros/PySideModules.cmake:134 (file):
       file failed to open for writing (Permission denied):
      
      /usr/share/PySide2/typesystems/typesystem_core_common.xml
      Call Stack (most recent call first):
       PySide2/QtCore/CMakeLists.txt:179 (create_pyside_module)
       

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            jschueller Julien Schueller
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes