• Home
  • Raw
  • Download

Lines Matching +full:download +full:- +full:url

3 This is currently a MacOSX-only strawman implementation.
7 an online XML database per (platform, python-version) containing packages
46 # source: setup-based package
53 DEFAULT_PIMPDATABASE_FMT="http://www.python.org/packman/version-%s/%s-%s-%s-%s-%s.plist"
67 osname, release, machine = longplatform.split('-')
80 url = DEFAULT_PIMPDATABASE_FMT % (PIMP_VERSION, status, pyvers, osname, rel, machine)
82 urllib2.urlopen(url)
91url = DEFAULT_PIMPDATABASE_FMT % (PIMP_VERSION, status, pyvers, osname, release, machine)
98 return url
120 """Abstract base class - Downloader for archives"""
129 def download(self, url, filename, output=None): member in PimpDownloader
139 def download(self, url, filename, output=None): member in PimpCurlDownloader
140 self.update("Downloading %s..." % url)
143 "--output", filename,
144 url)
145 self.update("Downloading %s: finished" % url)
150 def download(self, url, filename, output=None): member in PimpUrllibDownloader
152 self.update("Downloading %s: opening connection" % url)
154 download = urllib2.urlopen(url)
155 if 'content-length' in download.headers:
156 length = long(download.headers['content-length'])
158 length = -1
160 data = download.read(4096) #read 4K at a time
172 if length == -1:
173 keepgoing = self.update("Downloading %s: %d bytes..." % (url, dlsize))
175 …keepgoing = self.update("Downloading %s: %d%% (%d bytes)..." % (url, int(100.0*dlsize/length), dls…
176 data = download.read(4096)
178 self.update("Downloading %s: finished" % url)
182 """Abstract base class - Unpacker for archives"""
257 names = [member.name for member in skip if member.name[-1] != '/']
273 """Container for per-user preferences, such as the database to use
302 # Installing to non-standard location.
304 ('--install-lib', installDir),
305 ('--install-headers', None),
306 ('--install-scripts', None),
307 ('--install-data', None)]
323 rv += "Warning: Download directory \"%s\" does not exist\n" % self.downloadDir
325 … rv += "Warning: Download directory \"%s\" is not writable or not readable\n" % self.downloadDir
353 return -1
374 def url(self): return self._url member in PimpDatabase
384 def appendURL(self, url, included=0): argument
385 """Append packages from the database with the given URL.
389 if url in self._urllist:
391 self._urllist.append(url)
392 fp = urllib2.urlopen(url).fp
399 (url, version))
409 self._url = url
410 self._appendPackages(plistdata['Packages'], url)
413 o = urllib.basejoin(url, o)
416 def _appendPackages(self, packages, url): argument
423 if 'Download-URL' in p:
424 p['Download-URL'] = urllib.basejoin(url, p['Download-URL'])
479 # Remove ( and ) for pseudo-packages
480 if ident[0] == '(' and ident[-1] == ')':
481 ident = ident[1:-1]
482 # Split into name-version-flavor
483 fields = ident.split('-')
513 "Home-page",
514 "Download-URL",
515 "Install-test",
516 "Install-command",
517 "Pre-install-command",
518 "Post-install-command",
521 "User-install-skips",
522 "Systemwide-only",
544 def homepage(self): return self._dict.get('Home-page')
545 def downloadURL(self): return self._dict.get('Download-URL')
546 def systemwideOnly(self): return self._dict.get('Systemwide-only')
549 """Return the full name "name-version-flavor" of a package.
551 If the package is a pseudo-package, something that cannot be
556 rv = rv + '-%s' % self._dict['Version']
558 rv = rv + '-%s' % self._dict['Flavor']
560 # Pseudo-package, show in parentheses
576 return -cmp(self.version(), other.version())
594 installTest = self._dict['Install-test'].strip() + '\n'
606 sys.stderr.write("-------------------------------------\n")
607 sys.stderr.write("---- %s: install test got exception\n" % self.fullname())
608 sys.stderr.write("---- source:\n")
610 sys.stderr.write("---- exception:\n")
614 sys.stderr.write("---- Please copy this and mail to %s\n" % self._db._maintainer)
615 sys.stderr.write("-------------------------------------\n")
622 The list contains 2-tuples, of which the first item is either
625 something that isn't pimp-installable, in which case the descriptive
629 if not self._dict.get('Download-URL'):
630 # For pseudo-packages that are already installed we don't
640 "Package %s can only be installed system-wide" %
651 name = name + '-' + item['Version']
653 name = name + '-' + item['Flavor']
664 """Download a single package, if needed.
666 An MD5 signature is used to determine whether download is needed,
668 If output is given it is a file-like object that will receive a log
675 scheme, loc, path, query, frag = urlparse.urlsplit(self._dict['Download-URL'])
681 return "Please download package manually and save as %s" % self.archiveFilename
684 if not downloader.download(self._dict['Download-URL'],
686 return "download command failed"
688 return "archive not found after download"
709 if filename[-len(ext):] == ext:
713 self.basename = filename[:-len(ext)]
726 """Download, unpack and install a single package.
728 If output is given it should be a file-like object and it
731 if not self._dict.get('Download-URL'):
732 … return "%s: This package needs to be installed manually (no Download-URL field)" % self.fullname()
735 return "%s: download: %s" % (self.fullname(), msg)
744 """Bookkeeping before installation: remember what we have in site-packages"""
755 if fn[-4:] != '.pth':
767 if line[-1] == '\n':
768 line = line[:-1]
779 expected_skips = self._dict.get('User-install-skips')
800 If output is given it should be a file-like object and it
803 if 'Install-command' in self._dict:
804 return "%s: Binary package cannot have Install-command" % self.fullname()
806 if 'Pre-install-command' in self._dict:
807 if _cmd(output, '/tmp', self._dict['Pre-install-command']):
808 return "pre-install %s: running \"%s\" failed" % \
809 (self.fullname(), self._dict['Pre-install-command'])
816 if filename[-len(ext):] == ext:
820 self.basename = filename[:-len(ext)]
826 if k == "--install-lib":
839 if 'Post-install-command' in self._dict:
840 if _cmd(output, '/tmp', self._dict['Post-install-command']):
841 return "%s: post-install: running \"%s\" failed" % \
842 (self.fullname(), self._dict['Post-install-command'])
861 If output is given it should be a file-like object and it
864 if 'Pre-install-command' in self._dict:
865 if _cmd(output, self._buildDirname, self._dict['Pre-install-command']):
866 return "pre-install %s: running \"%s\" failed" % \
867 (self.fullname(), self._dict['Pre-install-command'])
870 installcmd = self._dict.get('Install-command')
872 return "Package has install-command and can only be installed to standard location"
873 # This is the "bit-bucket" for installations: everything we don't
881 # to the bit-bucket.
901 if 'Post-install-command' in self._dict:
902 if _cmd(output, self._buildDirname, self._dict['Post-install-command']):
903 return "post-install %s: running \"%s\" failed" % \
904 (self.fullname(), self._dict['Post-install-command'])
916 If output is given it should be a file-like object and it
919 if 'Post-install-command' in self._dict:
920 return "%s: Installer package cannot have Post-install-command" % self.fullname()
922 if 'Pre-install-command' in self._dict:
923 if _cmd(output, '/tmp', self._dict['Pre-install-command']):
924 return "pre-install %s: running \"%s\" failed" % \
925 (self.fullname(), self._dict['Pre-install-command'])
929 installcmd = self._dict.get('Install-command')
1028 print "%-20.20s\t%s" % ("Package", "Description")
1037 print "%-20.20s\t%s" % (pkgname, description)
1041 print "\tDownload URL:\t", pkg.downloadURL()
1050 print "%-20.20s\t%s\t%s" % ("Package", "Installed", "Message")
1060 print "%-20.20s\t%-9.9s\t%s" % (pkgname, status, msg)
1068 print "%-20.20s\tRequirement: %s %s" % ("", pkg, msg)
1100 print "Usage: pimp [options] -s [package ...] List installed status"
1101 print " pimp [options] -l [package ...] Show package information"
1102 print " pimp [options] -i package ... Install packages"
1103 print " pimp -d Dump database to stdout"
1104 print " pimp -V Print version number"
1106 print " -v Verbose"
1107 print " -f Force installation"
1108 print " -D dir Set destination directory"
1110 print " -u url URL for database"
1130 if o == '-s':
1134 if o == '-l':
1138 if o == '-d':
1142 if o == '-V':
1146 if o == '-i':
1148 if o == '-f':
1150 if o == '-v':
1153 if o == '-D':
1155 if o == '-u':
1165 # If the end-user updates pimp through pimp the new version
1166 # will be called pimp_update and live in site-packages