diff options
| author | Shyamnath Premnadh <shyamnath.premnadh@qt.io> | 2023-04-04 16:18:47 +0200 |
|---|---|---|
| committer | Shyamnath Premnadh <shyamnath.premnadh@qt.io> | 2023-04-17 11:12:55 +0200 |
| commit | 0e40c7af91df19a2ac20d88b55d4ef4d71845c55 (patch) | |
| tree | b1002ad68cba00384ea0ee5c390c088ea630afe1 /sources/pyside-tools/deploy_lib/android/buildozer.py | |
| parent | b80c7822c61b70d9704b42db64db0d9637fa7079 (diff) | |
Deployment: Refactoring
- Fix --dry-run in Android deployment
- Add option to control raising a warning when adding new entries
to config file
- Remove unnecessary code and comments
Pick-to: 6.5
Task-number: PYSIDE-1612
Change-Id: I5975d76024d6289fe6b9af1caeca374acb81e8cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools/deploy_lib/android/buildozer.py')
| -rw-r--r-- | sources/pyside-tools/deploy_lib/android/buildozer.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sources/pyside-tools/deploy_lib/android/buildozer.py b/sources/pyside-tools/deploy_lib/android/buildozer.py index 91d55f4ca..2ebd49d1a 100644 --- a/sources/pyside-tools/deploy_lib/android/buildozer.py +++ b/sources/pyside-tools/deploy_lib/android/buildozer.py @@ -7,8 +7,8 @@ from .. import run_command, BaseConfig, Config class BuildozerConfig(BaseConfig): - def __init__(self, buildozer_spec_file: Path, pysidedeploy_config: Config, dry_run: bool): - super().__init__(buildozer_spec_file, dry_run, comment_prefixes="#") + def __init__(self, buildozer_spec_file: Path, pysidedeploy_config: Config): + super().__init__(buildozer_spec_file, comment_prefixes="#") self.set_value("app", "title", pysidedeploy_config.title) self.set_value("app", "package.name", pysidedeploy_config.title) self.set_value("app", "package.domain", @@ -16,7 +16,7 @@ class BuildozerConfig(BaseConfig): include_exts = self.get_value("app", "source.include_exts") include_exts = f"{include_exts},qml" - self.set_value("app", "source.include_exts", include_exts) + self.set_value("app", "source.include_exts", include_exts, raise_warning=False) self.set_value("app", "requirements", "python3,shiboken6,PySide6") @@ -73,12 +73,12 @@ class Buildozer: # creates buildozer.spec config file command = ["buildozer", "init"] run_command(command=command, dry_run=Buildozer.dry_run) - if not Buildozer.dry_run and not buildozer_spec.exists(): - raise RuntimeError(f"buildozer.spec not found in {Path.cwd()}") - BuildozerConfig(buildozer_spec, pysidedeploy_config, Buildozer.dry_run) + if not Buildozer.dry_run: + if not buildozer_spec.exists(): + raise RuntimeError(f"buildozer.spec not found in {Path.cwd()}") + BuildozerConfig(buildozer_spec, pysidedeploy_config) @staticmethod def create_executable(mode: str): - # build the application in release mode command = ["buildozer", "android", mode] run_command(command=command, dry_run=Buildozer.dry_run) |
