Home | History | Annotate | Download | only in system

Lines Matching refs:url

31 """Support for automatically downloading Python packages from an URL."""
54 """Supports automatically installing Python packages from an URL.
62 installer.install(url="http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b",
64 installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip",
203 """Return the path to the file containing the URL downloaded."""
204 filename = ".%s.url" % target_name
208 def _is_downloaded(self, target_name, url):
212 _log.debug('Checking %s URL downloaded...' % target_name)
217 _log.debug("No URL file found.")
223 return version.strip() == url.strip()
225 def _record_url_downloaded(self, target_name, url):
226 """Record the URL downloaded to a file."""
228 _log.debug("Recording URL downloaded...")
229 _log.debug(' URL: "%s"' % url)
232 self._write_file(version_path, url, "utf-8")
331 path: The path to the downloaded URL contents.
348 def _download_to_stream(self, url, stream):
349 """Download an URL to a stream, and return the number of bytes."""
351 netstream = urllib.urlopen(url)
354 message = ('Could not download Python modules from URL "%s".\n'
359 % (url, err))
378 def _download(self, url, scratch_dir):
379 """Download URL contents, and return the download path."""
380 url_path = urlparse.urlsplit(url)[2]
385 self._log_transfer("Starting download...", url, target_path)
388 bytes = self._download_to_stream(url, stream)
394 def _install(self, scratch_dir, package_name, target_path, url,
396 """Install a python package from an URL.
402 path = self._download(url=url, scratch_dir=scratch_dir)
424 self._record_url_downloaded(package_name, url)
426 def install(self, url, should_refresh=False, target_name=None,
428 """Install a python package from an URL.
431 url: The URL from which to download the package.
439 URL sub-path. This parameter must be provided if
440 the URL sub-path is not specified.
441 url_subpath: The relative path of the URL directory that should
443 the entire URL contents.
456 if not should_refresh and self._is_downloaded(target_name, url):
457 _log.debug('URL for %s already downloaded. Skipping...'
459 _log.debug(' "%s"' % url)
463 url, target_path, log_method=_log.info)
474 url=url,
511 url="http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b",
515 url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip",