Skip to content
Browse files

Enable compiling on OSX

  • Loading branch information...
1 parent 91a3cab commit 1d85f928ff0e0ea62680f82186bb5c7d14fe36c2 @woudt woudt committed Sep 8, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 setup.py
View
9 setup.py
@@ -1,4 +1,5 @@
from os import name as os_name
+from platform import system as platform_system
from distutils.core import setup
from Cython.Distutils import extension
from Cython.Distutils import build_ext
@@ -10,6 +11,14 @@
extra_objects=['openzwave/cpp/lib/windows-mingw32/libopenzwave.a'],
include_dirs=['openzwave/cpp/src', 'openzwave/cpp/src/value_classes', 'openzwave/cpp/src/platform']
)]
+elif platform_system() == 'Darwin':
+ ext_modules = [extension.Extension("openzwave", ["openzwave.pyx"],
+ libraries=['stdc++'],
+ language="c++",
+ extra_link_args=['-framework', 'CoreFoundation', '-framework', 'IOKit'],
+ extra_objects=['openzwave/cpp/lib/mac/libopenzwave.a'],
+ include_dirs=['openzwave/cpp/src', 'openzwave/cpp/src/value_classes', 'openzwave/cpp/src/platform']
+ )]
else:
ext_modules = [extension.Extension("openzwave", ["openzwave.pyx"],
libraries=['udev', 'stdc++'],

0 comments on commit 1d85f92

Please sign in to comment.
Something went wrong with that request. Please try again.