Exemplo n.º 1
0
        manifest['fullName'] = manifest['name']

    # * optional - check for jid - might be a problem with private key
    # create Package
    obj = Package(
        author=author,
        full_name=manifest['fullName'],
        name=manifest['name'],
        type=package_type,
        license=manifest['license'],
        description=manifest['description'] \
                if 'description' in manifest else ''
    )
    obj.save()
    obj.latest.set_version('empty.uploaded')
    obj.create_revision_from_archive(packed, manifest, author)

    return obj


def create_package_from_xpi(path, author, libs=[]):
    """
    Create new package(s) from the XPI
    Call Package.create_revision_from_xpi

    Args:
       path (str): direct, full path of the archive
       author (auth.User): author of the package
       libs (list of strings): libs to export from XPI

    Returns:
Exemplo n.º 2
0
        manifest['fullName'] = manifest['name']

    # * optional - check for jid - might be a problem with private key
    # create Package
    obj = Package(
        author=author,
        full_name=manifest['fullName'],
        name=manifest['name'],
        type=package_type,
        license=manifest['license'],
        description=manifest['description'] \
                if 'description' in manifest else ''
    )
    obj.save()
    obj.latest.set_version('empty.uploaded')
    obj.create_revision_from_archive(packed, manifest, author)

    return obj


def create_package_from_xpi(path, author, libs=[]):
    """
    Create new package(s) from the XPI
    Call Package.create_revision_from_xpi

    Args:
       path (str): direct, full path of the archive
       author (auth.User): author of the package
       libs (list of strings): libs to export from XPI

    Returns: