aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-04-23 12:51:12 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-04-25 06:29:59 +0000
commitd6143cf77b3e28945768596f671418623da02a43 (patch)
tree3bbd4ec020db48ad6ef5313047759a33ed167e54
parent5c7eb1ee4a8bafe81afcc29c689402c6ecf304b4 (diff)
Replace 'osx' with 'macos' in installation scripts
Change-Id: Ibe5412edb6467594c5d2fd80545d9e1572a286cb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--setup.py12
-rw-r--r--utils.py26
2 files changed, 19 insertions, 19 deletions
diff --git a/setup.py b/setup.py
index a36cd090d..8da8c70e2 100644
--- a/setup.py
+++ b/setup.py
@@ -301,7 +301,7 @@ from utils import update_env_path
from utils import init_msvc_env
from utils import regenerate_qt_resources
from utils import filter_match
-from utils import osx_fix_rpaths_for_library
+from utils import macos_fix_rpaths_for_library
from utils import copy_icu_libs
from utils import find_files_using_glob
@@ -1478,7 +1478,7 @@ class pyside_build(_build):
if OPTION_STANDALONE:
vars['built_modules'] = config['built_modules']
if sys.platform == 'darwin':
- self.prepare_standalone_package_osx(executables, vars)
+ self.prepare_standalone_package_macos(executables, vars)
else:
self.prepare_standalone_package_linux(executables, vars)
@@ -1566,7 +1566,7 @@ class pyside_build(_build):
"{pyside_package_dir}/PySide2/Qt/libexec",
vars=vars)
- def prepare_standalone_package_osx(self, executables, vars):
+ def prepare_standalone_package_macos(self, executables, vars):
built_modules = vars['built_modules']
# Directory filter for skipping unnecessary files.
@@ -1615,7 +1615,7 @@ class pyside_build(_build):
webengine_process_path = os.path.join(bundle, binary)
final_path = os.path.join(qt_lib_path, webengine_process_path)
rpath = "@loader_path/../../../../../"
- osx_fix_rpaths_for_library(final_path, rpath)
+ macos_fix_rpaths_for_library(final_path, rpath)
else:
ignored_modules = []
if not self.is_webengine_built(built_modules):
@@ -1649,7 +1649,7 @@ class pyside_build(_build):
binary = "QtWebEngineProcess"
final_path = os.path.join(qt_libexec_path, binary)
rpath = "@loader_path/../lib"
- osx_fix_rpaths_for_library(final_path, rpath)
+ macos_fix_rpaths_for_library(final_path, rpath)
# Copy the qt.conf file to libexec.
copyfile(
@@ -2063,7 +2063,7 @@ class pyside_build(_build):
final_rpath = "@loader_path/Qt/lib"
else:
final_rpath = self.qtinfo.libs_dir
- osx_fix_rpaths_for_library(srcpath, final_rpath)
+ macos_fix_rpaths_for_library(srcpath, final_rpath)
else:
raise RuntimeError('Not configured for platform ' +
diff --git a/utils.py b/utils.py
index 11d9fbc64..da4061fac 100644
--- a/utils.py
+++ b/utils.py
@@ -599,10 +599,10 @@ def back_tick(cmd, ret_err=False):
return out, err.strip(), retcode
-OSX_OUTNAME_RE = re.compile(r'\(compatibility version [\d.]+, current version '
+MACOS_OUTNAME_RE = re.compile(r'\(compatibility version [\d.]+, current version '
'[\d.]+\)')
-def osx_get_install_names(libpath):
+def macos_get_install_names(libpath):
"""
Get macOS library install names from library `libpath` using ``otool``
@@ -618,12 +618,12 @@ def osx_get_install_names(libpath):
"""
out = back_tick('otool -L ' + libpath)
libs = [line for line in out.split('\n')][1:]
- return [OSX_OUTNAME_RE.sub('', lib).strip() for lib in libs]
+ return [MACOS_OUTNAME_RE.sub('', lib).strip() for lib in libs]
-OSX_RPATH_RE = re.compile(r"path (.+) \(offset \d+\)")
+MACOS_RPATH_RE = re.compile(r"path (.+) \(offset \d+\)")
-def osx_get_rpaths(libpath):
+def macos_get_rpaths(libpath):
""" Get rpath load commands from library `libpath` using ``otool``
Parameters
@@ -650,7 +650,7 @@ def osx_get_rpaths(libpath):
continue
assert lines[ctr + 1].strip().startswith('cmdsize')
rpath_line = lines[ctr + 2].strip()
- match = OSX_RPATH_RE.match(rpath_line)
+ match = MACOS_RPATH_RE.match(rpath_line)
if match is None:
raise RuntimeError('Unexpected path line: ' + rpath_line)
rpaths.append(match.groups()[0])
@@ -658,7 +658,7 @@ def osx_get_rpaths(libpath):
return rpaths
-def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
+def macos_fix_rpaths_for_library(library_path, qt_lib_dir):
""" Adds required rpath load commands to given library.
This is a necessary post-installation step, to allow loading PySide
@@ -677,8 +677,8 @@ def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
rpath to installed Qt lib directory.
"""
- install_names = osx_get_install_names(library_path)
- existing_rpath_commands = osx_get_rpaths(library_path)
+ install_names = macos_get_install_names(library_path)
+ existing_rpath_commands = macos_get_rpaths(library_path)
needs_loader_path = False
for install_name in install_names:
@@ -700,10 +700,10 @@ def osx_fix_rpaths_for_library(library_path, qt_lib_dir):
# If the library depends on a Qt library, add an rpath load comment
# pointing to the Qt lib directory.
- osx_add_qt_rpath(library_path, qt_lib_dir, existing_rpath_commands,
+ macos_add_qt_rpath(library_path, qt_lib_dir, existing_rpath_commands,
install_names)
-def osx_add_qt_rpath(library_path, qt_lib_dir,
+def macos_add_qt_rpath(library_path, qt_lib_dir,
existing_rpath_commands = [], library_dependencies = []):
"""
Adds an rpath load command to the Qt lib directory if necessary
@@ -713,7 +713,7 @@ def osx_add_qt_rpath(library_path, qt_lib_dir,
(qt_lib_dir).
"""
if not existing_rpath_commands:
- existing_rpath_commands = osx_get_rpaths(library_path)
+ existing_rpath_commands = macos_get_rpaths(library_path)
# Return early if qt rpath is already present.
if qt_lib_dir in existing_rpath_commands:
@@ -721,7 +721,7 @@ def osx_add_qt_rpath(library_path, qt_lib_dir,
# Check if any library dependencies are Qt libraries (hacky).
if not library_dependencies:
- library_dependencies = osx_get_install_names(library_path)
+ library_dependencies = macos_get_install_names(library_path)
needs_qt_rpath = False
for library in library_dependencies: