def run(args, ff=''):
    """Run setup.py with monkey patches applied.
    """
    import setuptools.command.egg_info
    if ff == 'none':
        setuptools.command.egg_info.walk_revctrl = no_walk_revctrl
    else:
        setuptools.command.egg_info.walk_revctrl = partial(walk_revctrl, ff=ff)

    sys.argv = ['setup.py'] + args
    import setup

    cleanup_pycache()
Run setup.py with monkey patches applied.