| |
- PimpDatabase
- PimpPackage
- PimpPreferences
class PimpDatabase |
|
Class representing a pimp database. It can actually contain
information from multiple databases through inclusion, but the
toplevel database is considered the master, as its maintainer is
"responsible" for the contents. |
|
Methods defined here:
- __init__(self, prefs)
- appendURL(self, url, included=0)
- Append packages from the database with the given URL.
Only the first database should specify included=0, so the
global information (maintainer, description) get stored.
- close(self)
- Clean up
- description(self)
- dump(self, pathOrFile)
- Dump the contents of the database to an XML .plist file.
The file can be passed as either a file object or a pathname.
All data, including included databases, is dumped.
- find(self, ident)
- Find a package. The package can be specified by name
or as a dictionary with name, version and flavor entries.
Only name is obligatory. If there are multiple matches the
best one (higher version number, flavors ordered according to
users' preference) is returned.
- list(self)
- Return a list of all PimpPackage objects in the database.
- listnames(self)
- Return a list of names of all packages in the database.
- maintainer(self)
- url(self)
- # Accessor functions
- version(self)
|
class PimpPackage |
|
Class representing a single package. |
|
Methods defined here:
- __cmp__(self, other)
- Compare two packages, where the "better" package sorts lower.
- __getitem__(self, key)
- __init__(self, db, plistdata)
- afterInstall(self)
- Bookkeeping after installation: interpret any new .pth files that have
appeared
- beforeInstall(self)
- Bookkeeping before installation: remember what we have in site-packages
- description(self)
- downloadPackageOnly(self, output=None)
- Download a single package, if needed.
An MD5 signature is used to determine whether download is needed,
and to test that we actually downloaded what we expected.
If output is given it is a file-like object that will receive a log
of what happens.
If anything unforeseen happened the method returns an error message
string.
- downloadURL(self)
- dump(self)
- Return a dict object containing the information on the package.
- filterExpectedSkips(self, names)
- Return a list that contains only unpexpected skips
- flavor(self)
- fullname(self)
- Return the full name "name-version-flavor" of a package.
If the package is a pseudo-package, something that cannot be
installed through pimp, return the name in (parentheses).
- homepage(self)
- installPackageOnly(self, output=None)
- Default install method, to be overridden by subclasses
- installSinglePackage(self, output=None)
- Download, unpack and install a single package.
If output is given it should be a file-like object and it
will receive a log of what happened.
- installed(self)
- Test wheter the package is installed.
Returns two values: a status indicator which is one of
"yes", "no", "old" (an older version is installed) or "bad"
(something went wrong during the install test) and a human
readable string which may contain more details.
- name(self)
- prerequisites(self)
- Return a list of prerequisites for this package.
The list contains 2-tuples, of which the first item is either
a PimpPackage object or None, and the second is a descriptive
string. The first item can be None if this package depends on
something that isn't pimp-installable, in which case the descriptive
string should tell the user what to do.
- shortdescription(self)
- systemwideOnly(self)
- unpackPackageOnly(self, output=None)
- Unpack a downloaded package archive.
- version(self)
|
class PimpPreferences |
|
Container for per-user preferences, such as the database to use
and where to install packages. |
|
Methods defined here:
- __init__(self, flavorOrder=None, downloadDir=None, buildDir=None, installDir=None, pimpDatabase=None)
- check(self)
- Check that the preferences make sense: directories exist and are
writable, the install directory is on sys.path, etc.
- compareFlavors(self, left, right)
- Compare two flavor strings. This is part of your preferences
because whether the user prefers installing from source or binary is.
- isUserInstall(self)
- setInstallDir(self, installDir=None)
- setWatcher(self, watcher)
| |