def test(self): "binding builder using mm" from mcstas2.wrappers.binding_builder.mm import build from mcstas2.wrappers.binding_builder.Binding import Binding binding = Binding( python_package = 'projectname', binding_module = 'projectname', c_headers = [ 'src/bindings.h', 'src/exceptions.h', 'src/misc.h', ], c_sources = [ 'src/bindings.cc', 'src/exceptions.cc', 'src/misc.cc', 'src/projectnamemodule.cc', ], python_sources = [ 'src/__init__.py', ], c_libs = [ ], c_includes = [ ], ) build(binding) import projectname.projectname as p self.assertEqual( p.hello(), 'hello' ) return
def test(self): "binding builder using distutils" from mcstas2.wrappers.binding_builder.distutils import build from mcstas2.wrappers.binding_builder.Binding import Binding binding = Binding( python_package = 'projectname', binding_module = 'projectname', c_headers = [ 'src/bindings.h', 'src/exceptions.h', 'src/misc.h', ], c_sources = [ 'src/bindings.cc', 'src/exceptions.cc', 'src/misc.cc', 'src/projectnamemodule.cc', ], python_sources = [ 'src/__init__.py', ], c_libs = [ ], c_includes = [ # os.environ[ 'BLD_INCDIR' ], # os.environ[ 'CONFIG_PLATFORM_INCDIR' ], # os.environ[ 'CONFIG_COMPILER_INCDIR' ], # os.environ[ 'CONFIG_TARGET_INCDIR' ], ], ) export_modules = os.environ.get('EXPORT_MODULES') if not export_modules: export_modules = os.path.join(os.environ['EXPORT_ROOT'], 'modules') build(binding, site_package_path = export_modules) import projectname.projectname as p self.assertEqual( p.hello(), 'hello' ) return
def test(self): "binding builder using distutils" from mcstas2.wrappers.binding_builder.distutils import build from mcstas2.wrappers.binding_builder.Binding import Binding binding = Binding( python_package='projectname', binding_module='projectname', c_headers=[ 'src/bindings.h', 'src/exceptions.h', 'src/misc.h', ], c_sources=[ 'src/bindings.cc', 'src/exceptions.cc', 'src/misc.cc', 'src/projectnamemodule.cc', ], python_sources=[ 'src/__init__.py', ], c_libs=[], c_includes=[ # os.environ[ 'BLD_INCDIR' ], # os.environ[ 'CONFIG_PLATFORM_INCDIR' ], # os.environ[ 'CONFIG_COMPILER_INCDIR' ], # os.environ[ 'CONFIG_TARGET_INCDIR' ], ], ) export_modules = os.environ.get('EXPORT_MODULES') if not export_modules: export_modules = os.path.join(os.environ['EXPORT_ROOT'], 'modules') build(binding, site_package_path=export_modules) import projectname.projectname as p self.assertEqual(p.hello(), 'hello') return