aboutsummaryrefslogtreecommitdiffstats
path: root/qtinfo.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-02-26 15:51:53 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-03-02 20:34:37 +0000
commit0c51c4dd78c564eaf722a2735ef1f8236ce00a86 (patch)
treea12dbeb211f965226ad5b1c19019bc31f115642c /qtinfo.py
parentb83eb9e389b0b9501c18dcc123d1957bd7246815 (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 'qtinfo.py')
-rw-r--r--qtinfo.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/qtinfo.py b/qtinfo.py
index 1c95f9638..606bc6804 100644
--- a/qtinfo.py
+++ b/qtinfo.py
@@ -56,6 +56,10 @@ class QtInfo(object):
def getQmlPath(self):
return self.getProperty("QT_INSTALL_QML")
+ def getMacOSMinDeploymentTarget(self):
+ """ Return value is a macOS version or None. """
+ return self.getProperty("QMAKE_MACOSX_DEPLOYMENT_TARGET")
+
def getBuildType(self):
""" Return value is either debug, release, debug_release, or None. """
return self.getProperty("BUILD_TYPE")
@@ -134,6 +138,11 @@ class QtInfo(object):
# Get mkspecs variables and cache them.
self._getQMakeMkspecsVariables()
+ # Get macOS minimum deployment target.
+ key = 'QMAKE_MACOSX_DEPLOYMENT_TARGET'
+ if key in self._mkspecs_dict:
+ self._query_dict[key] = self._mkspecs_dict[key]
+
# Figure out how Qt was built: debug mode, release mode, or both.
build_type = self._parseQtBuildType()
if build_type:
@@ -181,5 +190,6 @@ class QtInfo(object):
headers_dir = property(getHeadersPath)
docs_dir = property(getDocsPath)
qml_dir = property(getQmlPath)
+ macos_min_deployment_target = property(getMacOSMinDeploymentTarget)
build_type = property(getBuildType)
src_dir = property(getSrcDir)