All pastes #420842 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-02 13:11 UTC
rendered paste body
class BinaryPackageRecipe(PackageRecipe):
    name = 'binarypackage'
    version = '1.0'

    archive = None

    def unpack(r):
        """
        Hook for unpacking the archive; works by default only if
        r.archive has been set in the subclass.  Each subclass needs
        to either define the r.archive string along with r.name
        and r.version, or it needs to implement its own r.unpack()
        method.
        """
        if not r.archive:
            raise BinaryPackageError('Define either the r.archive string'
                                     ' or the r.unpack() method')
        r.addArchive(r.archive, dir='/')