SWIG python bindings, has same typemap problem as PHP

This commit is contained in:
Meredith L. Patterson 2013-11-17 20:26:51 -06:00
parent a5da580457
commit 804b8f7bd1
2 changed files with 15 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# -*- python -*- # -*- python -*-
Import('env') Import('env')
bindings = [] bindings = ['python']
dist_headers = [ dist_headers = [
"hammer.h", "hammer.h",

View file

@ -0,0 +1,14 @@
# -*- python -*-
Import('env')
pythonenv = env.Clone()
pythonenv.Append(CPPPATH = ['../../', '/usr/include/python2.7'])
pythonenv.Append(CCFLAGS = ['-fpic', '-DSWIG', '-Wno-all', '-Wno-extra', '-Wno-error'])
pythonenv.Append(SWIGFLAGS = ['-DHAMMER_INTERNAL__NO_STDARG_H', '-Isrc/', '-python'])
pythonenv.Command("hammer.i", "../swig/hammer.i", Copy("$TARGET", "$SOURCE"))
swig = ['hammer.i']
libhammer_python = pythonenv.SharedLibrary('hammer', swig)