diff options
author | Patrik Teivonen <patrik.teivonen@qt.io> | 2022-09-19 13:56:08 +0300 |
---|---|---|
committer | Patrik Teivonen <patrik.teivonen@qt.io> | 2023-01-24 08:16:22 +0000 |
commit | af577fe8782e18188273e48c3ce3f475ac2debf4 (patch) | |
tree | ee765420a3668a22ce476485ae82421f25c79fdd /packaging-tools/bld_openssl.py | |
parent | e1ade868e5aa13abc368444c582a0de762204ff2 (diff) |
PL122: os.path.splitext("foo.bar") should be replaced by path.suffix
os.path.split and os.path.splitext to pathlib equivalents
adjust bldinstallercommon.calculate_relpath unit tests
Change-Id: Ieb49864ed4f804cfdff61492edfb622ce1c4a9dc
Reviewed-by: Antti Kokko <antti.kokko@qt.io>
Diffstat (limited to 'packaging-tools/bld_openssl.py')
-rw-r--r-- | packaging-tools/bld_openssl.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packaging-tools/bld_openssl.py b/packaging-tools/bld_openssl.py index 58f951c63..9210a0e65 100644 --- a/packaging-tools/bld_openssl.py +++ b/packaging-tools/bld_openssl.py @@ -1,7 +1,7 @@ #!/usr/bin/env python ############################################################################# # -# Copyright (C) 2022 The Qt Company Ltd. +# Copyright (C) 2023 The Qt Company Ltd. # Contact: http://www.qt-project.org/legal # # This file is part of the release tools of the Qt Toolkit. @@ -57,8 +57,8 @@ def build(src_dir: str, install_dir: str, toolset: str) -> None: def archive(install_dir: str, archive_prefix: str) -> None: - (directory, name) = os.path.split(install_dir) - run_cmd(cmd=["7z", "a", archive_prefix + ".7z", name], cwd=directory) + install_path = Path(install_dir) + run_cmd(cmd=["7z", "a", archive_prefix + ".7z", install_path.name], cwd=install_path.parent) run_cmd(cmd=["7z", "a", archive_prefix + "-runtime.7z", "*.dll"], cwd=Path(install_dir, "bin")) |