package module (Package, AURPackage, ABSPackage classes)

Author:Chris Warrick <chris@chriswarrick.com>
Copyright:© 2011-2023, Chris Warrick.
License:BSD (see /LICENSE or Appendix B.)
Date:2023-01-30
Version:4.3.2

New in version 3.0.0.

Added in 3.0.0, the Package family of classes is the core of PKGBUILDer. They are responsible for storing package data in a consistent way. All class entries are Pythonic.

Historic note: whenever ABS is used, it means repository package. The ABS tool was deprecated in 2017 and replaced by ASP; however, PKGBUILDer uses that abbreviation to refer to packages that are in Arch repositories.

The Package class, the most important class in PKGBUILDer.

Copyright:© 2011-2023, Chris Warrick.
License:BSD (see /LICENSE).
class pkgbuilder.package.Package(**kwargs)[source]

The base class for packages.

This is base class. It shouldn’t be used directly. It contains the following attributes:

Name Type Default Description
is_abs bool None A boolean informing of the package type, to prevent isinstance(pkg, ABSPackage) checks.
name str None The name of the package.
version str None Current package version.
description str None Package description.
repo str None The repo or category (AUR) of the package in question.
url str None The upstream URL specified in the PKGBUILD.
licenses list [] Licenses specified in the PKGBUILD.
human str None The packager (repo) or maintainer (AUR) of the package in question.
class pkgbuilder.package.AURPackage(**kwargs)[source]

An AUR package.

classmethod from_aurdict(aurdict)[source]

Create an instance of AURPackage from AUR RPC data.

This class contains all the attributes of Package, is_abs = False and the following attributes:

Name Type Default Description
id int None ID of the AUR package.
is_outdated bool None Package OoD flag status in the AUR.
outdated_since date None A date (datetime.datetime(), aware UTC) of OoD flagging date OR None.
added date None A date (datetime.datetime(), aware UTC) representing package addition time.
modified date None A date (datetime.datetime(), aware UTC) representing the last modification time.
votes int None Count of AUR votes.
urlpath str None The URL of the tarball, sans https://aur.archlinux.org. Not used in AURv4.
_category_id int None AUR Category ID, not supposed to be used by most people (hence the underscore).
class pkgbuilder.package.AURPackage(**kwargs)[source]

An AUR package.

classmethod from_aurdict(aurdict)[source]

Create an instance of AURPackage from AUR RPC data.

This class has a total of 29 attributes (21 if you exclude the Package ones) and is_abs = True. For more information, consult either the attribute names or documentation for/code of libalpm and pyalpm.