def prepare_host_compilation(M):
    assert(len(M.entry_points) == 1)
    procedure_name = M.entry_points[0]
    hash, (wrap_type, wrap_name), wrap_args = M.wrap_info
    host_module = codepy.bpl.BoostPythonModule(max_arity=max(10,M.arity),
                                               use_private_namespace=False)
    host_module.add_to_preamble([CG.Include("prelude/prelude.h"),
                                 CG.Include("prelude/runtime/cunp.hpp"),
                                 CG.Include("prelude/runtime/make_cuarray.hpp"),
                                 CG.Include("prelude/runtime/make_sequence.hpp"),
                                 CG.Include("prelude/runtime/tuple_utilities.hpp"),
                                 CG.Line('using namespace copperhead;')])

    host_module.add_to_init([CG.Statement(
                "boost::python::def(\"%s\", &%s)" % (
                    procedure_name, wrap_name))])
    wrapped_code = [CG.Line(M.compiler_output),
                    CG.Line(hash % 'using namespace %s;')]
    host_module.add_to_module(wrapped_code)
    M.codepy_module = host_module
    if M.compile:
        M.current_toolchains = (M.toolchains.host_toolchain,)
    else:
        M.current_toolchains = (M.toolchains.null_host_toolchain,)
    M.code = (str(host_module.generate()),)
    M.kwargs = dict(cache_dir=M.code_dir,
                    debug=M.verbose)
    return []
dataset/ETHPy150Open bryancatanzaro/copperhead/copperhead/compiler/binarygenerator.py/prepare_host_compilation/swapped operands of `%`