aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6
diff options
context:
space:
mode:
authorShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-01-30 12:09:04 +0100
committerShyamnath Premnadh <Shyamnath.Premnadh@qt.io>2024-03-01 14:36:12 +0100
commit9948f7fd34b268cffaf8cb06d6925f59ce0c538f (patch)
tree531f8ceb14ade275523d61816a63dab6fbd357eb /sources/pyside6
parent019a1932c559f0d73d2d8bcd4b3b26ba03dbccb8 (diff)
Deployment: More Refactoring and minor bug fixes
- setup_python() moved to constructor of PythonExecutable. -install_python_dependencies() moved under PythonExecutable in python_helper.py. - create_executable() of PythonExecutable removed. Instead, we call Nuitka.create_executable() directly. This removes unncessary import problems when using PythonExecutable class for Android Deployment. - nuitka==1.8.0 changed to Nuitka=1.8 in default.spec to match with the installed version. Otherwise, it forces the reinstall of Nuitka==1.8 every time (bug). - Remove recomputation of qt_plugins and local_libs. If the values exist in pysidedeploy.spec, then they should not be computed again. This serves the purposes of speeding up the deployment and also to no modifying the already existing pysidedeploy.spec. - find_pyside_modules() moved from python_helper.py to deploy_util.py. - Adapt tests. - Remove os.fspath wrapping from python.exe. This is not needed as python.exe is already pathlib.Path. Pick-to: 6.5 6.6 Task-number: PYSIDE-1612 Change-Id: Ic598e57cd2f2779c410b12fc9584cf60c5e94505 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/pyside6')
-rw-r--r--sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py6
-rw-r--r--sources/pyside6/tests/tools/pyside6-deploy/test_pyside6_deploy.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py b/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py
index 69185f654..44faaba86 100644
--- a/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py
+++ b/sources/pyside6/tests/tools/pyside6-android-deploy/test_pyside6_android_deploy.py
@@ -14,7 +14,7 @@ from unittest import mock
from unittest.mock import patch
sys.path.append(os.fspath(Path(__file__).resolve().parents[2]))
-from init_paths import init_test_paths
+from init_paths import init_test_paths # noqa: E402
init_test_paths(False)
@@ -140,7 +140,7 @@ class TestPySide6AndroidDeployWidgets(DeployTestBase):
expected_modules = {"Core", "Gui"}
obtained_modules = set(config_obj.get_value("buildozer", "modules").split(","))
self.assertEqual(obtained_modules, expected_modules)
- expected_local_libs = "plugins_platforms_qtforandroid"
+ expected_local_libs = ""
self.assertEqual(config_obj.get_value("buildozer", "local_libs"),
expected_local_libs)
self.assertEqual(config_obj.get_value("buildozer", "arch"), "x86_64")
@@ -243,7 +243,7 @@ class TestPySide6AndroidDeployQml(DeployTestBase):
expected_modules = {"Quick", "Core", "Gui", "Network", "Qml", "QmlModels", "OpenGL"}
obtained_modules = set(config_obj.get_value("buildozer", "modules").split(","))
self.assertEqual(obtained_modules, expected_modules)
- expected_local_libs = "plugins_platforms_qtforandroid"
+ expected_local_libs = ""
self.assertEqual(config_obj.get_value("buildozer", "local_libs"),
expected_local_libs)
expected_qt_plugins = set(dependent_plugins)
diff --git a/sources/pyside6/tests/tools/pyside6-deploy/test_pyside6_deploy.py b/sources/pyside6/tests/tools/pyside6-deploy/test_pyside6_deploy.py
index 725d317e5..8ee770846 100644
--- a/sources/pyside6/tests/tools/pyside6-deploy/test_pyside6_deploy.py
+++ b/sources/pyside6/tests/tools/pyside6-deploy/test_pyside6_deploy.py
@@ -12,7 +12,7 @@ from unittest.mock import patch
from unittest import mock
sys.path.append(os.fspath(Path(__file__).resolve().parents[2]))
-from init_paths import init_test_paths
+from init_paths import init_test_paths # noqa: E402
init_test_paths(False)
@@ -131,7 +131,7 @@ class TestPySide6DeployWidgets(DeployTestBase):
self.assertEqual(config_obj.get_value("app", "project_dir"), ".")
self.assertEqual(config_obj.get_value("app", "exec_directory"), ".")
self.assertEqual(config_obj.get_value("python", "packages"),
- "nuitka==1.8.0,ordered_set,zstandard")
+ "Nuitka==1.8,ordered_set,zstandard")
self.assertEqual(config_obj.get_value("qt", "qml_files"), "")
equ_base = "--quiet --noinclude-qt-translations"
equ_value = equ_base + " --static-libpython=no" if is_pyenv_python() else equ_base
@@ -208,7 +208,7 @@ class TestPySide6DeployQml(DeployTestBase):
self.assertEqual(config_obj.get_value("app", "project_dir"), ".")
self.assertEqual(config_obj.get_value("app", "exec_directory"), ".")
self.assertEqual(config_obj.get_value("python", "packages"),
- "nuitka==1.8.0,ordered_set,zstandard")
+ "Nuitka==1.8,ordered_set,zstandard")
self.assertEqual(config_obj.get_value("qt", "qml_files"), "main.qml,MovingRectangle.qml")
equ_base = "--quiet --noinclude-qt-translations"
equ_value = equ_base + " --static-libpython=no" if is_pyenv_python() else equ_base