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 committed by Dan Hirsch
parent ada7bf89ee
commit 77d48e2b7c
2 changed files with 15 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# -*- python -*-
Import('env')
bindings = []
bindings = ['python']
dist_headers = [
"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)