diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-09-20 15:38:06 +0200 |
|---|---|---|
| committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-10-07 09:39:00 +0200 |
| commit | 9a10caa1e22773ce7563f82680c67596293178e4 (patch) | |
| tree | 43f34f1da86c6d9b5c3535c2652d07af75d4a07c /sources/pyside-tools/deploy_lib/deploy_util.py | |
| parent | 9fb2cee3aa525d8b7af065ba875e3a4d1c77e64b (diff) | |
Deployment: Create pyside6-deploy always in main project directory
- There was an issue where if you run pyside6-deploy from a folder
different from the project directory, it creates a new
'pysidedeploy.spec' every time unless you run
'pyside6-deploy -c <config_file>'. This patches fixes this issue by
always creating the pysidedeploy.spec in the main project directory
i.e. the parent directory of the main Python file.
- Additionally, the function 'create_config_file()' can be simplified
since it can never accept an empty 'main_file' argument and the
parameter 'config_file' can be removed.
Pick-to: 6.7
Task-number: PYSIDE-1612
Change-Id: I435f79e7222a55831cddcfbc50e07bc214e24cee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools/deploy_lib/deploy_util.py')
| -rw-r--r-- | sources/pyside-tools/deploy_lib/deploy_util.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sources/pyside-tools/deploy_lib/deploy_util.py b/sources/pyside-tools/deploy_lib/deploy_util.py index b8744352d..e2bb27946 100644 --- a/sources/pyside-tools/deploy_lib/deploy_util.py +++ b/sources/pyside-tools/deploy_lib/deploy_util.py @@ -39,16 +39,12 @@ def cleanup(config: Config, is_android: bool = False): logging.info(f"[DEPLOY] {str(buildozer_build)} removed") -def create_config_file(dry_run: bool = False, config_file: Path = None, main_file: Path = None): +def create_config_file(main_file: Path, dry_run: bool = False): """ - Sets up a new pysidedeploy.spec or use an existing config file + Creates a new pysidedeploy.spec """ - if main_file: - if main_file.parent != Path.cwd(): - config_file = main_file.parent / "pysidedeploy.spec" - else: - config_file = Path.cwd() / "pysidedeploy.spec" + config_file = main_file.parent / "pysidedeploy.spec" logging.info(f"[DEPLOY] Creating config file {config_file}") if not dry_run: |
