Skip to content

Commit

Permalink
Allow install on 32bit MacOSX
Browse files Browse the repository at this point in the history
Tested with the showcase and some example apps, as no test suite is available. Looks like it works on my old i386 macbook...
  • Loading branch information
alanjds committed Nov 9, 2013
1 parent 9a60525 commit d33cd35
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@

platform = sys.platform

# Detect 32/64bit for OSX (http://stackoverflow.com/a/1405971/798575)
if sys.platform == 'darwin':
if sys.maxsize > 2**32:
osx_arch = 'x86_64'
else:
osx_arch = 'i386'

# Detect Python for android project (http://github.com/kivy/python-for-android)
ndkplatform = environ.get('NDKPLATFORM')
if ndkplatform is not None and environ.get('LIBLINK'):
Expand Down Expand Up @@ -232,8 +239,8 @@ def determine_gl_flags():
flags['libraries'] = ['GLESv2']
flags['extra_link_args'] = ['-framework', 'OpenGLES']
elif platform == 'darwin':
flags['extra_link_args'] = ['-framework', 'OpenGL', '-arch', 'x86_64']
flags['extra_compile_args'] = ['-arch', 'x86_64']
flags['extra_link_args'] = ['-framework', 'OpenGL', '-arch', osx_arch]
flags['extra_compile_args'] = ['-arch', osx_arch]
elif platform.startswith('freebsd'):
flags['include_dirs'] = ['/usr/local/include']
flags['extra_link_args'] = ['-L', '/usr/local/lib']
Expand Down

0 comments on commit d33cd35

Please sign in to comment.