diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2022-10-25 14:13:59 +0200 |
---|---|---|
committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2022-11-17 14:22:47 +0100 |
commit | f9ca52cc893270aab1725c286dee6b28fd89ab08 (patch) | |
tree | b6a644f51ad2b50dd0a45f31134cf7d92010867a | |
parent | 4f8a99db711e18f2e8da03b1daff52c8768cd7f7 (diff) |
Deploy Tool Fix: os.fspath instead of pathlib
- for subprocess calls use os.fspath instead of pathlib
Change-Id: I7f0a47d4c8a0d9daa55d6b432f9bac9ed2019a91
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 3a3eb76b59615dd8db2a9220f26c46cf3d839b59)
-rw-r--r-- | sources/pyside-tools/deploy/nuitka_helper.py | 3 | ||||
-rw-r--r-- | sources/pyside-tools/deploy/python_helper.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sources/pyside-tools/deploy/nuitka_helper.py b/sources/pyside-tools/deploy/nuitka_helper.py index a6b3f79d6..17929d99d 100644 --- a/sources/pyside-tools/deploy/nuitka_helper.py +++ b/sources/pyside-tools/deploy/nuitka_helper.py @@ -1,6 +1,7 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +import os import sys from pathlib import Path from .utils import run_command @@ -33,7 +34,7 @@ class Nuitka: output_dir.mkdir(parents=True, exist_ok=True) print("[DEPLOY] Running Nuitka") command = self.nuitka + [ - source_file, + os.fspath(source_file), "--follow-imports", "--onefile", "--enable-plugin=pyside6", diff --git a/sources/pyside-tools/deploy/python_helper.py b/sources/pyside-tools/deploy/python_helper.py index 3831b7dde..de6b1ad02 100644 --- a/sources/pyside-tools/deploy/python_helper.py +++ b/sources/pyside-tools/deploy/python_helper.py @@ -20,7 +20,8 @@ class PythonExecutable: self.dry_run = dry_run if create_venv: self.__create_venv() - self.nuitka = Nuitka(nuitka=[self.exe, "-m", "nuitka"]) + + self.nuitka = Nuitka(nuitka=[os.fspath(self.exe), "-m", "nuitka"]) @property def exe(self): |