forked from USNavalResearchLaboratory/mgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
37 lines (29 loc) · 1.1 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
import platform
from distutils.core import setup, Extension
# Note that the 'mgen' package has a dependency
# on the Protolib Python 'protokit' package and
# also requires that the 'mgen' binary be installed/
# located in the user's executable PATH.
PYTHON = "src/python/"
COMMON = "src/common/"
srcFiles = [COMMON + 'gpsPub.cpp', PYTHON + 'gpsPub_wrap.c']
sys_libs = ['_gpsPub']
system = platform.system().lower()
sys_macros = [('HAVE_ASSERT',None), ('HAVE_IPV6',None), ('PROTO_DEBUG', None)]
if system == 'darwin':
sys_libs.append('resolv')
# TBD - invoke the "protolib/setup.py" automatically?
# (good intern task to do this the right way)
setup(name='mgen',
version='1.0',
package_dir = {'' : 'src/python'},
py_modules=['mgen']
)
setup(name='gpsPub',
version='1.0',
ext_modules = [Extension('_gpsPub',
srcFiles,
include_dirs = ['./include'],
define_macros=sys_macros,
# libraries = sys_libs,
library_dirs = ['./lib'])])