def configure_distutils_command(cmdline):
 d = Distribution(attrs={'cmdclass': vars(frontend), 'script_args': shlex.split(cmdline)})
 d.parse_command_line()
 assert (len(d.commands) == 1)
 cmdinst = d.get_command_obj(d.commands[0])
 cmdinst.ensure_finalized()
 return cmdinst

def configure_distutils_command ( cmdline ) : d = Distribution ( attrs = { 'cmdclass' : vars ( frontend ) , 'script_args' : shlex . split ( cmdline ) } ) d . parse_command_line ( ) assert ( len ( d . commands ) == 1 ) cmdinst = d . get_command_obj ( d . commands [ 0 ] ) cmdinst . ensure_finalized ( ) return cmdinst
helper to configure a command class .