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

Replace ad-hoc .pyproject files by pyproject.toml

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • PySide
    • None
    • pside pyproject
    • b6918e2ee (master), 2384da479 (master), 69ecc3c71 (dev), 58dc331da (dev), 8c491f70a (dev), 545ca796d (dev)

    Description

      When the usage of pyproject.toml was formalized in the Python community, we consider using it in our examples, so even Qt Creator could recognize them.

      After replacing the plaintext .pyqtc files into a JSON-based .pyproject one, we have notice the need of adding new options to Python projects, both related to the project itself but also the tools we provide around PySide.

      We should then migrate the .pyproject approach to adopt pyproject.toml files, to be closer with the community standard.

      Implementation in Qt Creator

      There are a few options to parse Toml files within Qt Creator:

      1. Write a self-made parser
      2. Add a 3rdparty dependency for an existing module
      3. Work on a separate Qt-module that can handle toml interaction

      After discussion with Qt Creator team members, the option 2. was selected to be more straightforward.

      Details for this epic task (Qt Creator)

      • A C++ library will be added as 3rdparty dependency to Qt Creator (e.g. toml++) - src/libs/3rdparty
      • The current approach parsing .pyproject files will be left as secondary option, to keep compatibility with older projects.
      • A simple initial support for pyproject.toml will be provided to open projects in QtCreator, that can be formed as:
        # pyproject.toml
        # ...
        [tool.qtcreator]
        files = ["file1.py", "file2.py", ...]
        

        which will help with the migration from the previous .pyproject files.

      Details for this epic task (PySide)

      Other tools like pyside6-project or pyside6-deploy can benefit of having configurable options, so an study needs to be done in order to add new file-configurable options, that should go in the shape of (tentatively)

      # pyproject.toml
      # ...
      
      [tool.qtcreator]
      files = [...]
      
      [tool.pyside_project]
      option_a = value
      option_b = value
      
      [tool.pyside_deploy]
      option_c = value
      

      Attachments

        Issue Links

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

          Activity

            People

              shpremna Shyamnath Premnadh
              crmaurei Cristian Maureira-Fredes
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews