Skip to content

Commit

Permalink
Merge pull request #149 from msmolens/osx-yosemite-build
Browse files Browse the repository at this point in the history
OS X: use JavaVM framework from current Mac OS SDK
  • Loading branch information
tito committed Mar 12, 2015
2 parents 9425a2c + 6fa4980 commit c489ec4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@
libraries = ['sdl', 'log']
library_dirs = ['libs/' + environ['ARCH']]
elif platform == 'darwin':
import objc
framework = objc.pathForFramework('JavaVM.framework')
import subprocess
framework = subprocess.Popen('xcrun --sdk macosx --show-sdk-path',
shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
if not framework:
raise Exception('You must install Java on your Mac OS X distro')
extra_link_args = ['-framework', 'JavaVM']
include_dirs = [join(framework, 'Versions/A/Headers')]
include_dirs = [join(framework, 'System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers')]
else:
import subprocess
# otherwise, we need to search the JDK_HOME
Expand Down

0 comments on commit c489ec4

Please sign in to comment.