Commits

Ronan Amicel committed 52093db

Fix build on Mac OS X

  • Participants
  • Parent commits c15f107

Comments (0)

Files changed (1)

 ez_setup.use_setuptools()
 
 import sys, os, os.path, re, shutil
+import platform
 import subprocess
 
 from setuptools import setup
                                 os.path.join(os.path.dirname(__file__), "src", "gurl", name))
 elif os.name == "posix":
     source_files += [os.path.join(GOOGLE_URL_HOME, 'base', 'string16.cc')]
-    libraries += ["boost_python", "boost_system", "boost_filesystem", "rt", "icuuc", "icui18n"]
+    if sys.platform == "darwin":
+        libraries += ["boost_python-mt", "boost_system-mt", "boost_filesystem-mt", "icuuc", "icui18n"]
+        if platform.architecture()[0] == '64bit':
+            os.environ['ARCHFLAGS'] = '-arch x86_64'
+        else:
+            os.environ['ARCHFLAGS'] = '-arch i386'
+    else:
+        libraries += ["boost_python", "boost_system", "boost_filesystem", "rt", "icuuc", "icui18n"]
     include_dirs = [GOOGLE_URL_HOME,
                     os.path.join(GOOGLE_URL_HOME, '..')]
     library_dirs = [os.path.join(GOOGLE_URL_HOME, 'src'),