def main():
    deps_path = path.join(path.abspath(path.dirname(__file__)), 'deps')
    if not path.isdir(deps_path):
        os.mkdir(deps_path)

    temp_path = tempfile.mkdtemp()
    try:
        build_path = path.join(temp_path, 'build')
        os.mkdir(build_path)

        for package in dependencies:
            package_name = package['package_name']
            dest_path = path.join(deps_path, package_name)
            if path.isdir(dest_path):
                print "Skipping %r, it's already installed" % package_name
            else:
                install(package, build_path, temp_path)
                site_pkg = 'Library/Python/2.6/site-packages'
                install_path = path.join(temp_path, site_pkg, package_name)
                shutil.copytree(install_path, dest_path)
                print "Installed %r" % dest_path

    finally:
        shutil.rmtree(temp_path)
dataset/ETHPy150Open mgax/tinymail/python-builder/install_deps.py/main/original