Lines Matching +full:read +full:- +full:pkg +full:- +full:up
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('-')
120 """Abstract base class - Downloader for archives"""
143 "--output", filename,
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:
176 data = download.read(4096)
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)]
353 return -1
380 """Clean up"""
423 if 'Download-URL' in p:
424 p['Download-URL'] = urllib.basejoin(url, p['Download-URL'])
427 pkg = PimpPackage_source(self, p)
429 pkg = PimpPackage_binary(self, p)
431 pkg = PimpPackage_installer(self, p)
433 pkg = PimpPackage_installer(self, p)
435 pkg = PimpPackage(self, dict(p))
436 self._packages.append(pkg)
447 for pkg in self._packages:
448 rv.append(pkg.fullname())
459 for pkg in self._packages:
460 packages.append(pkg.dump())
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" %
646 pkg = None
651 name = name + '-' + item['Version']
653 name = name + '-' + item['Flavor']
654 pkg = self._db.find(name)
655 if not pkg:
658 descr = pkg.shortdescription()
659 rv.append((pkg, descr))
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'])
684 if not downloader.download(self._dict['Download-URL'],
700 data = open(self.archiveFilename, 'rb').read()
709 if filename[-len(ext):] == ext:
713 self.basename = filename[:-len(ext)]
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()
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')
974 for pkg, descr in prereqs:
975 if pkg:
976 self._prepareInstall(pkg, False, recursive)
1003 for pkg in self._todo:
1004 msg = pkg.installSinglePackage(output)
1028 print "%-20.20s\t%s" % ("Package", "Description")
1031 pkg = db.find(pkgname)
1032 if pkg:
1033 description = pkg.shortdescription()
1034 pkgname = pkg.fullname()
1037 print "%-20.20s\t%s" % (pkgname, description)
1039 print "\tHome page:\t", pkg.homepage()
1041 print "\tDownload URL:\t", pkg.downloadURL()
1044 description = pkg.description()
1050 print "%-20.20s\t%s\t%s" % ("Package", "Installed", "Message")
1053 pkg = db.find(pkgname)
1054 if pkg:
1055 status, msg = pkg.installed()
1056 pkgname = pkg.fullname()
1060 print "%-20.20s\t%-9.9s\t%s" % (pkgname, status, msg)
1062 prereq = pkg.prerequisites()
1063 for pkg, msg in prereq:
1064 if not pkg:
1065 pkg = ''
1067 pkg = pkg.fullname()
1068 print "%-20.20s\tRequirement: %s %s" % ("", pkg, msg)
1075 pkg = db.find(pkgname)
1076 if not pkg:
1079 list, messages = inst.prepareInstall(pkg, force)
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