aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Lacko <backup.rlacko@gmail.com>2013-10-19 00:15:02 -0700
committerRoman Lacko <backup.rlacko@gmail.com>2013-10-19 00:15:02 -0700
commit2171f8cb9cba655b577b2cdf80767fe526ce518a (patch)
tree184d51e2909298c9431e53e5c019c5f3badc8879
parent11aaca4237ac382b101b043d2871ab0d0deb9076 (diff)
parentde53ee6a3a3d345fd4b1e7f92428ca8e521d4de7 (diff)
Merge pull request #21 from ctismer/master
fix setup on OS X and homebrew
-rw-r--r--pyside_postinstall.py3
-rw-r--r--qtinfo.py4
-rw-r--r--setup.py11
3 files changed, 8 insertions, 10 deletions
diff --git a/pyside_postinstall.py b/pyside_postinstall.py
index ec8146aba..a10aef789 100644
--- a/pyside_postinstall.py
+++ b/pyside_postinstall.py
@@ -78,6 +78,9 @@ def back_tick(cmd, ret_err=False):
"""
proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True)
out, err = proc.communicate()
+ if not isinstance(out, str):
+ # python 3
+ out = out.decode()
retcode = proc.returncode
if retcode is None:
proc.terminate()
diff --git a/qtinfo.py b/qtinfo.py
index 0cf132863..631adb667 100644
--- a/qtinfo.py
+++ b/qtinfo.py
@@ -30,6 +30,9 @@ class QtInfo(object):
def getTranslationsPath(self):
return self.getProperty("QT_INSTALL_TRANSLATIONS")
+ def getHeadersPath(self):
+ return self.getProperty("QT_INSTALL_HEADERS")
+
def getProperty(self, prop_name):
cmd = [self._qmake_path, "-query", prop_name]
proc = subprocess.Popen(cmd, stdout = subprocess.PIPE, shell=False)
@@ -48,3 +51,4 @@ class QtInfo(object):
qmake_path = property(getQMakePath)
imports_dir = property(getImportsPath)
translations_dir = property(getTranslationsPath)
+ headers_dir = property(getHeadersPath)
diff --git a/setup.py b/setup.py
index a8ac82e95..2e8abc5f1 100644
--- a/setup.py
+++ b/setup.py
@@ -580,16 +580,7 @@ class pyside_build(_build):
cmake_cmd.append("-DUSE_PYTHON3=ON")
if sys.platform == 'darwin':
- if 'QTDIR' in os.environ:
- # If the user has QTDIR set, then use it as a prefix for an extra include path
- cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR={0}/include'.format(os.environ['QTDIR']))
- #:{0}/lib I had problems specifying both dirs. Is it needed? Is there some other way to do it? --Robin
- else:
- # Otherwise assume it is a standard install and add the
- # Frameworks folder as a workaround for a cmake include problem
- # http://neilweisenfeld.com/wp/120/building-pyside-on-the-mac
- # https://groups.google.com/forum/#!msg/pyside/xciZZ4Hm2j8/CUmqfJptOwoJ
- cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=/Library/Frameworks')
+ cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=' + self.qtinfo.headers_dir)
if OPTION_OSXARCH:
# also tell cmake which architecture to use