diff options
author | Christian Tismer <tismer@stackless.com> | 2016-09-24 11:33:36 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2016-10-18 14:43:32 +0000 |
commit | 8c090690a206e83eba88fcf785b95932f7ad9203 (patch) | |
tree | a7239c1e182124da230418c42df8ba30417ffb6e /setup.py | |
parent | 52f4ed0829bf8a47ad3cc16d7679d31ae645f17b (diff) |
Make paths absolute in setup.py
The paths for "qmake" and "cmake" will not work when they are relative paths.
This problem is pretty subtle, when setup.py breaks because it cannot create the
simple list at line 712, variable "cmake_cmd". This innocent looking list is causing problems, because
it uses qtinfo.py, and this is dependent on properties which call back into
the subprocess module!
The properties in qtinfo.py are now real properties, because their values are
early computed in __init__. The problem is solved by this patch.
Change-Id: I877b6644fa2909ca9ac1f23d4ce5accfc869716b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -233,6 +233,12 @@ if OPTION_QMAKE is None: if OPTION_QMAKE is None: OPTION_QMAKE = find_executable("qmake") +# make qtinfo.py independent of relative paths. +if OPTION_QMAKE is not None and os.path.exists(OPTION_QMAKE): + OPTION_QMAKE = os.path.abspath(OPTION_QMAKE) +if OPTION_CMAKE is not None and os.path.exists(OPTION_CMAKE): + OPTION_CMAKE = os.path.abspath(OPTION_CMAKE) + QMAKE_COMMAND = None if OPTION_QMAKE is not None and os.path.exists(OPTION_QMAKE): # Checking whether qmake executable exists if os.path.islink(OPTION_QMAKE) and os.path.lexists(OPTION_QMAKE): # Looking whether qmake path is a link and whether the link exists @@ -247,7 +253,6 @@ if len(QMAKE_COMMAND) == 0 or QMAKE_COMMAND[0] is None: if not os.path.exists(QMAKE_COMMAND[0]): print("'%s' does not exist." % QMAKE_COMMAND[0]) sys.exit(1) - if OPTION_CMAKE is None: OPTION_CMAKE = find_executable("cmake") |