diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-02-26 15:51:53 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-03-02 20:34:37 +0000 |
commit | 0c51c4dd78c564eaf722a2735ef1f8236ce00a86 (patch) | |
tree | a12dbeb211f965226ad5b1c19019bc31f115642c /utils.py | |
parent | b83eb9e389b0b9501c18dcc123d1957bd7246815 (diff) |
Improve macOS minimum deployment target decision process
Instead of asking the user to specify a minimum macOS deployment
target, setup.py will now query the value from qmake. A user can
still specify a custom value if they wish to do so.
This simplifies building on the CI, meaning there is no need to
hardcode the minimum deployment targets per branch.
Task-number: PYSIDE-603
Task-number: PYSIDE-606
Change-Id: I55c79dc643b5a2b59d0e65add132c581fb6fc7f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -874,3 +874,17 @@ def rpathsHasOrigin(rpaths): if match: return True return False + +def memoize(function): + """ Decorator to wrap a function with a memoizing callable. + It returns cached values when the wrapped function is called with the same arguments. + """ + memo = {} + def wrapper(*args): + if args in memo: + return memo[args] + else: + rv = function(*args) + memo[args] = rv + return rv + return wrapper |