• Home
  • Raw
  • Download

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
369 '--root=%s' % root,
370 '--install-lib=%s' % install_lib,
371 '--no-compile'
392 A sorted generator of 2-element tuples:
394 1: A tuple of tuples containing integers - this is the output of
412 download record are applicable to the current version of Python
415 The "python_version" value from a PyPi download JSON structure. This
419 The "requires_python" value from a PyPi download JSON structure. This
420 will be None, or a comma-separated list of conditions that must be
434 ver_str = ver_str[:-2]
470 A list of dicts containing a key "url", "python_version" and
474 A unicode string URL, or None if not a valid release for the current
482 win_arch = 'win32' if sys.maxsize == 2147483647 else 'win-amd64'
484 exe_suffix = '.%s-py%d.%d.exe' % (win_arch, version_info[0], version_info[1])
491 for download in downloads:
492 … if not _is_valid_python_version(download.get('python_version'), download.get('requires_python')):
495 if exe_suffix and download['url'].endswith(exe_suffix):
496 exe = download['url']
497 if download['url'].endswith('.whl'):
498 parts = os.path.basename(download['url']).split('-')
499 tag_impl = parts[-3]
500 tag_abi = parts[-2]
501 tag_arch = parts[-1].split('.')[0]
502 wheels[(tag_impl, tag_abi, tag_arch)] = download['url']
503 if download['url'].endswith('.tar.bz2'):
504 tar_bz2 = download['url']
505 if download['url'].endswith('.tar.gz'):
506 tar_gz = download['url']
508 # Find the most-specific wheel possible
515 url = exe
517 url = whl
519 url = tar_bz2
521 url = tar_gz
525 return url
530 Installs requirements without using Python to download, since
543 url = None
546 if p['type'] == 'url':
560 url = pkg
562 raise Exception('Unable to install package from URL that is not an archive')
567 pkg_info = json.loads(f.read().decode('utf-8'))
574 url = _locate_suitable_download(pkg_info['releases'][p['ver']])
575 if not url:
576 … raise Exception('Unable to find a compatible download of %s == %s' % (pkg, p['ver']))
582 url = _locate_suitable_download(pkg_info['releases'][ver_str])
583 if url:
585 if not url:
587 … raise Exception('Unable to find a compatible download of %s >= %s' % (pkg, p['ver']))
589 raise Exception('Unable to find a compatible download of %s' % pkg)
591 local_path = _download(url, deps_dir)
608 - 'type' ('any', 'url', '==', '>=')
609 - 'pkg'
610 - 'ver' (if 'type' == '==' or 'type' == '>=')
619 contents = f.read().decode('utf-8')
638 if re.match(r'^\s*-r\s*', package):
639 sub_req_file = re.sub(r'^\s*-r\s*', '', package)
645 packages.append({'type': 'url', 'pkg': package})
662 if re.search(r'[^ a-zA-Z0-9\-]', package):
684 A 2-element tuple of (stdout, stderr)
696 if retry and retry in stderr.decode('utf-8'):