diff options
| author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-10-13 12:36:23 +0200 |
|---|---|---|
| committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-10-18 11:34:52 +0200 |
| commit | 2afcf8e7545c681e412e5b6d04ab8867e5edd5c7 (patch) | |
| tree | 060e956fa8aa99301a60bab605b2fd3d3ed19f13 /build_scripts/platforms/linux.py | |
| parent | 7f2c40d9b32b7b7b161d224c483b1fe23270c446 (diff) | |
pathlib: migrate build_scripts away from os.path
There is a usage of os.path.relpath that cannot be migrated
to pathlib, which remain the only usage of os.path
Task-number: PYSIDE-2080
Change-Id: Iac781e9c9324fb8b9d3559b4225912d56782072a
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'build_scripts/platforms/linux.py')
| -rw-r--r-- | build_scripts/platforms/linux.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/build_scripts/platforms/linux.py b/build_scripts/platforms/linux.py index a75259698..4629d456c 100644 --- a/build_scripts/platforms/linux.py +++ b/build_scripts/platforms/linux.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only import os +from pathlib import Path from ..config import config from ..options import OPTION @@ -121,8 +122,8 @@ def prepare_standalone_package_linux(self, _vars, cross_build=False): if copy_qt_conf: # Copy the qt.conf file to libexec. - qt_libexec_path = "{st_build_dir}/{st_package_name}/Qt/libexec".format(**_vars) - if not os.path.isdir(qt_libexec_path): + qt_libexec_path = Path("{st_build_dir}/{st_package_name}/Qt/libexec".format(**_vars)) + if not qt_libexec_path.is_dir(): os.makedirs(qt_libexec_path) copyfile(f"{{build_dir}}/{PYSIDE}/{{st_package_name}}/qt.conf", - qt_libexec_path, _vars=_vars) + str(qt_libexec_path), _vars=_vars) |
