@task
def upload(quiet=False):
    """ Uploads the latest distribution to pypi. """

    lib = file(os.path.join("petlib", "__init__.py")).read()
    v = re.findall("VERSION.*=.*['\"](.*)['\"]", lib)[0]

    tell("upload dist %s" % v)
    sh((v, v) % 'git tag -a v%s -m "Distribution versio v%s"')
    sh('python setup.py sdist upload', capture=quiet)
    tell('Remeber to upload tags using "git push --tags"')
dataset/ETHPy150Open gdanezis/petlib/pavement.py/upload/swapped operands of `%`