'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.'

def prerequisites(self):

    rv = []
    if (not self._dict.get('Download-URL')):
        (status, _) = self.installed()
        if (status == 'yes'):
            return []
        return [(None, ('Package    %s    cannot    be    installed    automatically,    see    the    description' % self.fullname()))]
    if (self.systemwideOnly() and self._db.preferences.isUserInstall()):
        return [(None, ('Package    %s    can    only    be    installed    system-wide' % self.fullname()))]
    if (not self._dict.get('Prerequisites')):
        return []
    for item in self._dict['Prerequisites']:
        if (type(item) == str):
            pkg = None
            descr = str(item)
        else:
            name = item['Name']
            if ('Version' in item):
                name = ((name + '-') + item['Version'])
            if ('Flavor' in item):
                name = ((name + '-') + item['Flavor'])
            pkg = self._db.find(name)
            if (not pkg):
                descr = ('Requires    unknown    %s' % name)
            else:
                descr = pkg.shortdescription()
        rv.append((pkg, descr))
    return rv
