Lines Matching +full:download +full:- +full:url
1 # coding: utf-8
28 deps_dir = os.path.join(build_root, 'modularcrypto-deps')
56 def _download(url, dest): argument
58 Downloads a URL to a directory
60 :param url:
61 The URL to download
70 print('Downloading %s' % url)
71 filename = os.path.basename(url)
77 code += "(New-Object Net.WebClient).DownloadFile('%s', '%s');" % (url, dest_path)
78 _execute([powershell_exe, '-Command', code], dest, 'Unable to connect to')
82 ['curl', '-L', '--silent', '--show-error', '-O', url],
101 r'([-._]?(?:alpha|a|beta|b|preview|pre|c|rc)\.?\d*)?'
102 r'(-\d+|(?:[-._]?(?:rev|r|post)\.?\d*))?'
103 r'([-._]?dev\.?\d*)?',
118 pre = pre.lstrip('._-')
127 'a': -3,
128 'b': -2,
129 'rc': -1,
154 dev_tup = (-4, dev_dig)
203 Check if all members of the archive are in a single top-level directory
291 If running setup.py, change to this dir first - a unicode string
370 env[b'PYTHONPATH'] = deps_dir.encode('utf-8')
377 '--root=%s' % root,
378 '--install-lib=%s' % install_lib,
379 '--no-compile'
401 A sorted generator of 2-element tuples:
403 1: A tuple of tuples containing integers - this is the output of
421 download record are applicable to the current version of Python
424 The "python_version" value from a PyPi download JSON structure. This
428 The "requires_python" value from a PyPi download JSON structure. This
429 will be None, or a comma-separated list of conditions that must be
443 ver_str = ver_str[:-2]
479 A list of dicts containing a key "url", "python_version" and
483 A unicode string URL, or None if not a valid release for the current
491 win_arch = 'win32' if sys.maxsize == 2147483647 else 'win-amd64'
493 exe_suffix = '.%s-py%d.%d.exe' % (win_arch, version_info[0], version_info[1])
500 for download in downloads:
501 … if not _is_valid_python_version(download.get('python_version'), download.get('requires_python')):
504 if exe_suffix and download['url'].endswith(exe_suffix):
505 exe = download['url']
506 if download['url'].endswith('.whl'):
507 parts = os.path.basename(download['url']).split('-')
508 tag_impl = parts[-3]
509 tag_abi = parts[-2]
510 tag_arch = parts[-1].split('.')[0]
511 wheels[(tag_impl, tag_abi, tag_arch)] = download['url']
512 if download['url'].endswith('.tar.bz2'):
513 tar_bz2 = download['url']
514 if download['url'].endswith('.tar.gz'):
515 tar_gz = download['url']
517 # Find the most-specific wheel possible
524 url = exe
526 url = whl
528 url = tar_bz2
530 url = tar_gz
534 return url
539 Installs requirements without using Python to download, since
552 url = None
555 if p['type'] == 'url':
569 url = pkg
571 raise Exception('Unable to install package from URL that is not an archive')
576 pkg_info = json.loads(f.read().decode('utf-8'))
583 url = _locate_suitable_download(pkg_info['releases'][p['ver']])
584 if not url:
585 … raise Exception('Unable to find a compatible download of %s == %s' % (pkg, p['ver']))
591 url = _locate_suitable_download(pkg_info['releases'][ver_str])
592 if url:
594 if not url:
596 … raise Exception('Unable to find a compatible download of %s >= %s' % (pkg, p['ver']))
598 raise Exception('Unable to find a compatible download of %s' % pkg)
600 local_path = _download(url, deps_dir)
617 - 'type' ('any', 'url', '==', '>=')
618 - 'pkg'
619 - 'ver' (if 'type' == '==' or 'type' == '>=')
628 contents = f.read().decode('utf-8')
644 r'([-._]?(?:alpha|a|beta|b|preview|pre|c|rc)\.?\d*)?'
645 r'(-\d+|(?:[-._]?(?:rev|r|post)\.?\d*))?'
646 r'([-._]?dev\.?\d*)?'
657 if re.match(r'^\s*-r\s*', package):
658 sub_req_file = re.sub(r'^\s*-r\s*', '', package)
664 packages.append({'type': 'url', 'pkg': package})
681 if re.search(r'[^ a-zA-Z0-9\-]', package):
703 A 2-element tuple of (stdout, stderr)
716 if retry and retry in stderr.decode('utf-8'):