aboutsummaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-11-02 11:50:25 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2017-11-15 15:47:02 +0000
commit8815ef1cfddd79b99314a8e8e351b1a2235afc26 (patch)
tree99aad14c7f58c3be9141cbc4d7a8c9ff806e9ab5 /utils.py
parentcadc370720773b4372496fafc40b34f604da6f9b (diff)
Make standalone option work on macOS
Implements standalone option on macOS, both for .dylib Qt build and framework build. Multiple rules are applied to figure out which files need to be copied into the final package. We also take care to embed a proper LC_RPATH for the PySide libraries, so that they point to the copied over Qt libraries. Change-Id: I442749e7c2318a66a22e3a1dd0ae703fb8943acf Task-number: PYSIDE-558 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/utils.py b/utils.py
index 1762bb8e..98410838 100644
--- a/utils.py
+++ b/utils.py
@@ -275,8 +275,8 @@ def makefile(dst, content=None, vars=None):
f.close()
-def copydir(src, dst, filter=None, ignore=None, force=True,
- recursive=True, vars=None):
+def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars=None,
+ dir_filter_function=None):
if vars is not None:
src = src.format(**vars)
@@ -305,8 +305,12 @@ def copydir(src, dst, filter=None, ignore=None, force=True,
dstname = os.path.join(dst, name)
try:
if os.path.isdir(srcname):
+ if dir_filter_function and not dir_filter_function(name, src, srcname):
+ continue
if recursive:
- results.extend(copydir(srcname, dstname, filter, ignore, force, recursive, vars))
+ results.extend(
+ copydir(srcname, dstname, filter, ignore, force, recursive,
+ vars, dir_filter_function))
else:
if (filter is not None and not filter_match(name, filter)) or \
(ignore is not None and filter_match(name, ignore)):