aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorThomas-Karl Pietrowski <thopiekar@googlemail.com>2016-02-02 21:20:51 +0100
committerThomas-Karl Pietrowski <thopiekar@googlemail.com>2016-02-02 21:20:51 +0100
commit32938327b041c80acb057904ea72fd8582e6c4e1 (patch)
tree90a5f8f806555c5270b789e0695b611c6ca3720e /setup.py
parentca90a050c12f52bf5f4fb55f721ee5811f583afe (diff)
Intoducing new option "qt"
I would even call it qt_version, but qtchooser, which switches between different versions of Qt, is also using this option. So I hope this would be less confusing for other people. So in case you have different Qt5 installations you can choose now one of them by using --qt=5.4 for example. ``` $ qtchooser -l 4 5 default qt4-i386-linux-gnu qt4-x86_64-linux-gnu qt4 qt5-x86_64-linux-gnu qt5 ``` The main reason for this commit is that qtchooser chooses qt4 as default here on Ubuntu/Linux (as we can also see in the travis builds). This commit will add the option plus add the default to qt5.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 9f03120da..b6ab9161c 100644
--- a/setup.py
+++ b/setup.py
@@ -146,6 +146,7 @@ check_allowed_python_version()
OPTION_DEBUG = has_option("debug")
OPTION_RELWITHDEBINFO = has_option('relwithdebinfo')
OPTION_QMAKE = option_value("qmake")
+OPTION_QT_VERSION = option_value("qt")
OPTION_CMAKE = option_value("cmake")
OPTION_OPENSSL = option_value("openssl")
OPTION_ONLYPACKAGE = has_option("only-package")
@@ -161,6 +162,8 @@ OPTION_BUILDTESTS = has_option("build-tests")
OPTION_OSXARCH = option_value("osx-arch")
OPTION_XVFB = has_option("use-xvfb")
+if OPTION_QT_VERSION is None:
+ OPTION_QT_VERSION = "5"
if OPTION_QMAKE is None:
OPTION_QMAKE = find_executable("qmake-qt5")
if OPTION_QMAKE is None:
@@ -460,7 +463,7 @@ class pyside_build(_build):
log.error("Failed to locate a dynamic Python library, using %s"
% py_library)
- qtinfo = QtInfo([OPTION_QMAKE,])
+ qtinfo = QtInfo([OPTION_QMAKE, "-qt=%s" %(OPTION_QT_VERSION)])
qt_dir = os.path.dirname(OPTION_QMAKE)
qt_version = qtinfo.version
if not qt_version: