aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorRobin Dunn <robin@alldunn.com>2013-07-20 17:15:38 -0700
committerRobin Dunn <robin@alldunn.com>2013-07-20 17:15:38 -0700
commitf981508fe80668efc61654f2692779dfcdc3933c (patch)
treebc167b917ed1ed9e5115d75258c4051b62fb7cd8 /setup.py
parent932e272c0d60c1be3b08b2f9ef709da24e2f75c3 (diff)
Add --osx-arch option so the desired build architecture can be specified
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index d511cfd5e..7b9b500f3 100644
--- a/setup.py
+++ b/setup.py
@@ -106,6 +106,7 @@ OPTION_NOEXAMPLES = has_option("no-examples") # don't include pyside-example
OPTION_JOBS = option_value('jobs') # number of parallel build jobs
OPTION_JOM = has_option('jom') # use jom instead of nmake with msvc
OPTION_BUILDTESTS = has_option("build-tests")
+OPTION_OSXARCH = option_value("osx-arch")
if OPTION_QMAKE is None:
OPTION_QMAKE = find_executable("qmake")
@@ -589,9 +590,9 @@ class pyside_build(_build):
# https://groups.google.com/forum/#!msg/pyside/xciZZ4Hm2j8/CUmqfJptOwoJ
cmake_cmd.append('-DALTERNATIVE_QT_INCLUDE_DIR=/Library/Frameworks')
- # also tell cmake which architecture to use TODO: make this optional? Allow both?
- arch = 'i386' if platform.architecture()[0] == '32' else 'x86_64'
- cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(arch))
+ if OPTION_OSXARCH:
+ # also tell cmake which architecture to use
+ cmake_cmd.append("-DCMAKE_OSX_ARCHITECTURES:STRING={}".format(OPTION_OSXARCH))
log.info("Configuring module %s (%s)..." % (extension, module_src_dir))
if run_process(cmake_cmd, log) != 0: