Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. pyside6-deploy.py without QML - how?
Forum Updated to NodeBB v4.3 + New Features

pyside6-deploy.py without QML - how?

Scheduled Pinned Locked Moved Solved Qt for Python
7 Posts 4 Posters 2.0k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    StarterKit
    wrote on last edited by
    #1

    Hi all,
    I decided to give a try pyside6-deploy script.

    Actually, it is nuitka-based so first I tried nuitka itself. It works and creates a working ELF-binary for my python project. Probably I should be fine with it but I understood that there are some customizations for PySide6 and I would like to build for other platforms also. So I decided to try pyside6-deploy script.

    There were some minor issues that was easy to overcome but then I faced an error:
    ValueError: 'lib/python3.11/site-packages/PySide6/Qt/qml/QtMultimedia/Video.qml' is not in the subpath of 'project_directory' OR one path is relative and the other is absolute.

    The problem here - I don't use QML in my project at all. There is pysidedeploy.spec file that controls behavior - I tried to comment everything QML and buildozer related in it but the error persists.

    Does anyone know how to disaple QML usage for pyside6-deploy?

    G 1 Reply Last reply
    0
    • S Offline
      S Offline
      Shyamnath
      wrote on last edited by
      #4

      This error happens when you have your python virtualenv inside the application directory and it has pyside6 installed. If you run pyside6-deploy in verbose mode, it should have printed a warning reporting this and your pysidedeploy.spec should have a huge list of qml files included from lib/python3.11/site-packages/PySide6/Qt/qml/*.qml. It is recommended to not have python venv inside you application folder, otherwise pyside6-deploy will try to package it as well.

      pyside6-deploy tool automatically tries to identify the qml files in the application by doing a glob on the application folder in the case of a qml application. Otherwise the user will have to manually include them using the nuitka option '--include-data-files' which can be annoying.

      I agree the error message should be made better or the warning should be made an error.

      S S 3 Replies Last reply
      1
      • S StarterKit

        Hi all,
        I decided to give a try pyside6-deploy script.

        Actually, it is nuitka-based so first I tried nuitka itself. It works and creates a working ELF-binary for my python project. Probably I should be fine with it but I understood that there are some customizations for PySide6 and I would like to build for other platforms also. So I decided to try pyside6-deploy script.

        There were some minor issues that was easy to overcome but then I faced an error:
        ValueError: 'lib/python3.11/site-packages/PySide6/Qt/qml/QtMultimedia/Video.qml' is not in the subpath of 'project_directory' OR one path is relative and the other is absolute.

        The problem here - I don't use QML in my project at all. There is pysidedeploy.spec file that controls behavior - I tried to comment everything QML and buildozer related in it but the error persists.

        Does anyone know how to disaple QML usage for pyside6-deploy?

        G Offline
        G Offline
        gusarg81
        wrote on last edited by
        #2

        @StarterKit said in pyside6-deploy.py without QML - how?:

        Hi all,
        I decided to give a try pyside6-deploy script.

        Actually, it is nuitka-based so first I tried nuitka itself. It works and creates a working ELF-binary for my python project. Probably I should be fine with it but I understood that there are some customizations for PySide6 and I would like to build for other platforms also. So I decided to try pyside6-deploy script.

        There were some minor issues that was easy to overcome but then I faced an error:
        ValueError: 'lib/python3.11/site-packages/PySide6/Qt/qml/QtMultimedia/Video.qml' is not in the subpath of 'project_directory' OR one path is relative and the other is absolute.

        The problem here - I don't use QML in my project at all. There is pysidedeploy.spec file that controls behavior - I tried to comment everything QML and buildozer related in it but the error persists.

        Does anyone know how to disaple QML usage for pyside6-deploy?

        Hi, I was about to use this tool and I am asking the same: avoid including qml, since I don't use it in my App.

        Thanks.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #3

          Hi,

          Can you provide a minimal sample script that triggers this behaviour ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Shyamnath
            wrote on last edited by
            #4

            This error happens when you have your python virtualenv inside the application directory and it has pyside6 installed. If you run pyside6-deploy in verbose mode, it should have printed a warning reporting this and your pysidedeploy.spec should have a huge list of qml files included from lib/python3.11/site-packages/PySide6/Qt/qml/*.qml. It is recommended to not have python venv inside you application folder, otherwise pyside6-deploy will try to package it as well.

            pyside6-deploy tool automatically tries to identify the qml files in the application by doing a glob on the application folder in the case of a qml application. Otherwise the user will have to manually include them using the nuitka option '--include-data-files' which can be annoying.

            I agree the error message should be made better or the warning should be made an error.

            S S 3 Replies Last reply
            1
            • S Shyamnath

              This error happens when you have your python virtualenv inside the application directory and it has pyside6 installed. If you run pyside6-deploy in verbose mode, it should have printed a warning reporting this and your pysidedeploy.spec should have a huge list of qml files included from lib/python3.11/site-packages/PySide6/Qt/qml/*.qml. It is recommended to not have python venv inside you application folder, otherwise pyside6-deploy will try to package it as well.

              pyside6-deploy tool automatically tries to identify the qml files in the application by doing a glob on the application folder in the case of a qml application. Otherwise the user will have to manually include them using the nuitka option '--include-data-files' which can be annoying.

              I agree the error message should be made better or the warning should be made an error.

              S Offline
              S Offline
              Shyamnath
              wrote on last edited by
              #5

              related bug in Qt for Python: https://bugreports.qt.io/browse/PYSIDE-2164

              1 Reply Last reply
              0
              • S Shyamnath

                This error happens when you have your python virtualenv inside the application directory and it has pyside6 installed. If you run pyside6-deploy in verbose mode, it should have printed a warning reporting this and your pysidedeploy.spec should have a huge list of qml files included from lib/python3.11/site-packages/PySide6/Qt/qml/*.qml. It is recommended to not have python venv inside you application folder, otherwise pyside6-deploy will try to package it as well.

                pyside6-deploy tool automatically tries to identify the qml files in the application by doing a glob on the application folder in the case of a qml application. Otherwise the user will have to manually include them using the nuitka option '--include-data-files' which can be annoying.

                I agree the error message should be made better or the warning should be made an error.

                S Offline
                S Offline
                StarterKit
                wrote on last edited by
                #6

                @Shyamnath , thanks for detailed explanation.
                I'll try it once again a bit later and share the result.

                1 Reply Last reply
                0
                • S Shyamnath

                  This error happens when you have your python virtualenv inside the application directory and it has pyside6 installed. If you run pyside6-deploy in verbose mode, it should have printed a warning reporting this and your pysidedeploy.spec should have a huge list of qml files included from lib/python3.11/site-packages/PySide6/Qt/qml/*.qml. It is recommended to not have python venv inside you application folder, otherwise pyside6-deploy will try to package it as well.

                  pyside6-deploy tool automatically tries to identify the qml files in the application by doing a glob on the application folder in the case of a qml application. Otherwise the user will have to manually include them using the nuitka option '--include-data-files' which can be annoying.

                  I agree the error message should be made better or the warning should be made an error.

                  S Offline
                  S Offline
                  StarterKit
                  wrote on last edited by
                  #7

                  @Shyamnath thanks once again for your answer.
                  I confirm that you were right about the reason - everything went well when I moved venv into different location.

                  (Unfortunately the whole thing became broken after recent updates. A binary file created by pure nuitka worked month ago. But today nothing happens if I run newly generated file - regardles who created it - nuitka or pyside6-deploy. It exits silently without any error message).

                  1 Reply Last reply
                  0
                  • S StarterKit has marked this topic as solved on

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved