setup swig and templates