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?
-
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 yourpysidedeploy.spec
should have a huge list of qml files included fromlib/python3.11/site-packages/PySide6/Qt/qml/*.qml
. It is recommended to not have python venv inside you application folder, otherwisepyside6-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.
-
@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.
-
Hi,
Can you provide a minimal sample script that triggers this behaviour ?
-
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 yourpysidedeploy.spec
should have a huge list of qml files included fromlib/python3.11/site-packages/PySide6/Qt/qml/*.qml
. It is recommended to not have python venv inside you application folder, otherwisepyside6-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.
-
@Shyamnath , thanks for detailed explanation.
I'll try it once again a bit later and share the result. -
@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).
-