Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2806

pyside6-deploy: Rename the generated executable to the title specified in the .spec file on platforms other than MacOS

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.8.0
    • None
    • Tooling
    • None
    • Any OS that isn't MacOS/where sys.platform != "darwin".

    • 8ff61a10d (dev)

    Description

      Currently, pyside6-deploy only looks at the title parameter in the pysidedeploy.spec file if the platform being deployed to is MacOS, as is evident by this snippet of code from deploy_util.py:

      def finalize(config: Config):
          """
              Copy the executable into the final location
              For Android deployment, this is done through buildozer
          """
          generated_exec_path = config.generated_files_path / (config.source_file.stem + EXE_FORMAT)
          if generated_exec_path.exists() and config.exe_dir:
              if sys.platform == "darwin":
                  shutil.copytree(generated_exec_path, config.exe_dir / (config.title + EXE_FORMAT),
                                  dirs_exist_ok=True)
              else:
                  shutil.copy(generated_exec_path, config.exe_dir)
              print("[DEPLOY] Executed file created in "
                    f"{str(config.exe_dir / (config.source_file.stem + EXE_FORMAT))}")
      

      I think the else section should say this instead:

      else:
          shutil.copy(generated_exec_path, config.exe_dir / (config.title + EXE_FORMAT))
      

      This way, the file will always get renamed to what is specified by the title parameter/--name flag.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            shpremna Shyamnath Premnadh
            jirauser71545 user-a8bac (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change