meta_package_manager package¶
Subpackages¶
Submodules¶
meta_package_manager.base module¶
-
exception
meta_package_manager.base.
CLIError
(code, output, error)[source]¶ Bases:
exceptions.Exception
An error occured when running package manager CLI.
-
class
meta_package_manager.base.
PackageManager
[source]¶ Bases:
object
Package manager definition.
-
available
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
cli_args
= []¶
-
cli_path
= None¶
-
executable
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
exists
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
fresh
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
id
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
name
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
platforms
= frozenset([])¶
-
static
render_bitbar_cli
(full_cli)[source]¶ Format a bash-runnable full-CLI with parameters into bitbar schema.
-
requirement
= None¶
-
run
(args, dry_run=False)[source]¶ Run a shell command, return the output and keep error message.
Removes ANSI escape codes, and returns ready-to-use strings.
-
supported
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
sync
()[source]¶ Fetch latest versions of installed packages.
Returns a list of dict with package name, current installed version and latest upgradeable version.
-
upgrade
(package_id=None, dry_run=False)[source]¶ Perform the upgrade of the provided package to latest version.
-
upgrade_all
(dry_run=False)[source]¶ Perform a full upgrade of all outdated packages to latest versions.
If the manager doesn’t implements a full upgrade one-liner, then fall-back to calling single-package upgrade one by one.
-
version
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
version_string
¶ The
cachedproperty
is used similar toproperty
, except that the wrapped method is only called once. This is commonly used to implement lazy attributes.After the property has been accessed, the value is stored on the instance itself, using the same name as the cachedproperty. This allows the cache to be cleared with
delattr()
, or through manipulating the object’s__dict__
.
-
meta_package_manager.cli module¶
meta_package_manager.platform module¶
Helpers and utilities to handle platform idiosyncracies.
Module contents¶
Expose package-wide elements.