'Returns a cmd'

def get_cmd(self, metadata=None):

    if (metadata is None):
        metadata = {'name': 'fake', 'version': '1.0', 'url': 'xxx', 'author': 'xxx', 'author_email': 'xxx'}
    dist = Distribution(metadata)
    dist.script_name = 'setup.py'
    dist.packages = ['somecode']
    dist.include_package_data = True
    cmd = sdist(dist)
    cmd.dist_dir = 'dist'
    return (dist, cmd)
