aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/platforms/unix.py
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <[email protected]>2022-06-27 23:33:10 +0200
committerCristián Maureira-Fredes <[email protected]>2022-06-29 11:01:58 +0200
commit39b38b0cfc81d352c60c44efeb890b10c3e1bc88 (patch)
treea7777082b293a490f73fd49f72820b1dd3fda4a9 /build_scripts/platforms/unix.py
parenteba195611ac30fd490e87a03238060eca05f2073 (diff)
build: fix readability details
Removing some leftover common anti-patterns: - remove unnecessary dict() usage - remove unnecessary map() - avoid index-based loops - use capitalize() instead of index-based capitalization - use f-strings for concatenation Pick-to: 6.2 6.3 Change-Id: I0ffdf73ec47c6ef537789015052dea0fd047350d Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'build_scripts/platforms/unix.py')
-rw-r--r--build_scripts/platforms/unix.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/build_scripts/platforms/unix.py b/build_scripts/platforms/unix.py
index f345332e0..f109732e3 100644
--- a/build_scripts/platforms/unix.py
+++ b/build_scripts/platforms/unix.py
@@ -16,7 +16,7 @@ from .macos import prepare_standalone_package_macos
def _macos_copy_gui_executable(name, _vars=None):
"""macOS helper: Copy a GUI executable from the .app folder and return the
files"""
- app_name = name[:1].upper() + name[1:] + '.app'
+ app_name = f"{name.capitalize()}.app"
return copydir(f"{{install_dir}}/bin/{app_name}",
f"{{st_build_dir}}/{{st_package_name}}/{app_name}",
_filter=None, recursive=True,
@@ -56,9 +56,9 @@ def prepare_packages_posix(self, _vars):
def adjusted_lib_name(name, version):
postfix = ''
if sys.platform.startswith('linux'):
- postfix = '.so.' + version
+ postfix = f".so.{version}"
elif sys.platform == 'darwin':
- postfix = '.' + version + '.dylib'
+ postfix = f".{version}.dylib"
return name + postfix
if config.is_internal_shiboken_module_build():