def worch_package(ctx, worch_config, *args, **kw):

    # transfer waf-specific keywords explicitly
    kw['name'] = worch_config['package']
    kw['features'] = ' '.join(string2list(worch_config['features']))
    kw['use'] = worch_config.get('use')

    # make the TaskGen object for the package
    worch=WorchConfig(**worch_config)
    tgen = ctx(*args, worch=worch, **kw)
    tgen.env = ctx.all_envs[worch.package]
    tgen.env.env = tgen.env.munged_env
    msg.debug('orch: package "%s" with features: %s' % \
              (kw['name'], ', '.join(kw['features'].split())))
    return tgen