forked from maartendamen/py-openzwave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
37 lines (35 loc) · 1.74 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
if os_name == 'nt':
ext_modules = [extension.Extension("openzwave", ["openzwave.pyx"],
libraries=['setupapi', 'stdc++'],
language="c++",
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++'],
language="c++",
extra_objects=['openzwave/cpp/lib/linux/libopenzwave.a'],
include_dirs=['openzwave/cpp/src', 'openzwave/cpp/src/value_classes', 'openzwave/cpp/src/platform']
)]
setup(
name = 'py-openzwave',
author='Maarten Damen',
author_email='m.damen@gmail.com',
url='http://projects.maartendamen.com/projects/pyopenzwave/',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)