diff options
author | Thomas-Karl Pietrowski <thopiekar@googlemail.com> | 2016-02-03 22:53:19 +0100 |
---|---|---|
committer | Thomas-Karl Pietrowski <thopiekar@googlemail.com> | 2016-02-03 22:53:19 +0100 |
commit | 933ead732e66f524b79099ce245b6906c0135c37 (patch) | |
tree | 8f9152834d500d3989e327709677af35ad926ee7 /qtinfo.py | |
parent | 24dc4ff87241ecb5cf2266d75ea3b89fc4dff47d (diff) |
Cleanup around qtinfo.py
* cleaning up unneeded redeclarations in setup.py
* making sure our "-qt=X" get passed to cmake (doesn't make any difference so far, but makes sense)
* rename getQMakePath to getQMakeCommand and make it return the complete command
Diffstat (limited to 'qtinfo.py')
-rw-r--r-- | qtinfo.py | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -9,13 +9,11 @@ class QtInfo(object): else: self._qmake_command = [find_executable("qmake"),] - def getQMakePath(self): - qmake_path = self._qmake_command[0] # Guessing the first of the commands is qmake - if not os.path.exists(qmake_path): # Making it here a bit more failsave. - qmake_path = find_executable(qmake_path) # In case someone just passed the name of the executable I'll search for it now. - if qmake_path == None: # If we couldn't resolv the location of the executable - raise ValueError("Could not find the location of %s. Please pass the absolute path to qmake or please pass the correct name of the executable." %(qmake_path)) - return qmake_path + def getQMakeCommand(self): + qmake_command_string = self._qmake_command[0] + for entry in self._qmake_command[1:]: + qmake_command_string += " %s" %(entry) + return qmake_command_string def getVersion(self): return self.getProperty("QT_VERSION") @@ -56,7 +54,7 @@ class QtInfo(object): bins_dir = property(getBinsPath) libs_dir = property(getLibsPath) plugins_dir = property(getPluginsPath) - qmake_command = property(getQMakePath) + qmake_command = property(getQMakeCommand) imports_dir = property(getImportsPath) translations_dir = property(getTranslationsPath) headers_dir = property(getHeadersPath) |