diff --git a/src/SConscript b/src/SConscript index 1d9ca7621c1983d32cae4d86490d5d95c6582834..0cb41af72a02f3f43cba8f1c1093aed4eda407de 100644 --- a/src/SConscript +++ b/src/SConscript @@ -1,7 +1,7 @@ # -*- python -*- Import('env') -bindings = [] +bindings = ['python'] dist_headers = [ "hammer.h", diff --git a/src/bindings/python/SConscript b/src/bindings/python/SConscript new file mode 100644 index 0000000000000000000000000000000000000000..29d1ad96cc38209861fb3cec662c3156f71b93db --- /dev/null +++ b/src/bindings/python/SConscript @@ -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) \ No newline at end of file