diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-02-26 15:58:24 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-03-02 20:34:45 +0000 |
commit | 197d56d444e0368e07dd1e867c321d010f08f9f0 (patch) | |
tree | ad4ad3bb05673e1f233582cd651c78901ba53b93 /utils.py | |
parent | b1257389557d0fd82a37e37443e0aa80c093c5a2 (diff) |
Improve packaging on Windows
A lot of the packaging rules on Windows were outdated (Qt4 times).
This change does a couple of things to improve the process:
- Removes attempts of copying files matching Qt4 naming patterns
- Fixes filters to copy Qt dlls / pdbs for a single build
configuration (only debug dlls, or only release dlls depending on
which configuration was used when building PySide2). As a result
this reduces the total size of the package.
- Removes some comments that are outdated.
- Simplifies pdb copying logic.
- Adds a bit of whitespace between copying rules, for easier
navigation.
Change-Id: Icc06398f524f0249504750c718f97b61ffadf7df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -283,7 +283,7 @@ def makefile(dst, content=None, vars=None): def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars=None, - dir_filter_function=None, force_copy_symlinks=False): + dir_filter_function=None, file_filter_function=None, force_copy_symlinks=False): if vars is not None: src = src.format(**vars) @@ -317,10 +317,12 @@ def copydir(src, dst, filter=None, ignore=None, force=True, recursive=True, vars if recursive: results.extend( copydir(srcname, dstname, filter, ignore, force, recursive, - vars, dir_filter_function, force_copy_symlinks)) + vars, dir_filter_function, file_filter_function, + force_copy_symlinks)) else: - if (filter is not None and not filter_match(name, filter)) or \ - (ignore is not None and filter_match(name, ignore)): + if (file_filter_function is not None and not file_filter_function(name, srcname)) \ + or (filter is not None and not filter_match(name, filter)) \ + or (ignore is not None and filter_match(name, ignore)): continue if not os.path.exists(dst): os.makedirs(dst) |