def prepare_file(zip_path, full_spec):
    if (not os.path.isfile(zip_path)):
        zip_url = '{}{}.zip'.format(deps_url, urllib.parse.quote(full_spec))
        download_file(full_spec, zip_url, zip_path)
    print('Extracting {}...'.format(full_spec), end='')
    try:
        extract(zip_path, deps_dir)
    except BadZipfile:
        print(('\nError: %s.zip is not a valid zip file, redownload...' % full_spec))
        os.remove(zip_path)
        prepare_file(zip_path, full_spec)
    else:
        print('done')
def prepare_file(zip_path, full_spec):
    if (not os.path.isfile(zip_path)):
        zip_url = '{}{}.zip'.format(deps_url, urllib.parse.quote(full_spec))
        download_file(full_spec, zip_url, zip_path)
    print('Extracting {}...'.format(full_spec), end=)
    try:
        extract(zip_path, deps_dir)
    except BadZipfile:
        print(('\nError: %s.zip is not a valid zip file, redownload...' % full_spec))
        os.remove(zip_path)
        prepare_file(zip_path, full_spec)
    else:
        print('done')