meta_package_manager.managers package — Meta Package Manager 2.3.0 documentation

# meta_package_manager.managers package

## Submodules

## meta_package_manager.managers.apm module

class `meta_package_manager.managers.apm.` `APM`

  Bases: `meta_package_manager.base.PackageManager`

  `cli_path` = u'/usr/local/bin/apm'
  `get_version`()
  `name`

    The `cachedproperty` is used similar to `property`, 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([u'macos'])
  `sync`()
  `upgrade_all_cli`()
  `upgrade_cli`(package_id=None)

## meta_package_manager.managers.gem module

class `meta_package_manager.managers.gem.` `Gem`

  Bases: `meta_package_manager.base.PackageManager`

  `HOMEBREW_PATH` = u'/usr/local/bin/gem'
  `SYSTEM_PATH` = u'/usr/bin/gem'
  `cli_path`

    The `cachedproperty` is used similar to `property`, 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__`.

  `get_version`()
  `name`

    The `cachedproperty` is used similar to `property`, 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([u'macos'])
  `sync`()

    Sample of gem output:

    > $ gem outdated did_you_mean (1.0.0 < 1.0.2) io-console (0.4.5 < 0.4.6) json (1.8.3 < 2.0.1) minitest (5.8.3 < 5.9.0) power_assert (0.2.6 < 0.3.0) psych (2.0.17 < 2.1.0)

  `upgrade_all_cli`()
  `upgrade_cli`(package_id=None)

## meta_package_manager.managers.homebrew module

class `meta_package_manager.managers.homebrew.` `Homebrew`

  Bases: `meta_package_manager.base.PackageManager`

  `cli_path` = u'/usr/local/bin/brew'
  `get_version`()
  `id`

    The `cachedproperty` is used similar to `property`, 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([u'macos'])
  `requirement` = u'>= 1.0.*'
  `sync`()

    Fetch latest Homebrew formulas.

    Sample of brew output:

    > $ brew outdated –json=v1 [

    > > {

    > >   “name”: “cassandra”, “installed_versions”: [

    > >   > “3.5”

    > >   ], “current_version”: “3.7”

    > > }, {

    > > > “name”: “vim”, “installed_versions”: [

    > > > > “7.4.1967”

    > > > ], “current_version”: “7.4.1993”

    > > }, {

    > > > “name”: “youtube-dl”, “installed_versions”: [

    > > > > “2016.07.06”

    > > > ], “current_version”: “2016.07.09.1”

    > > }

    > ]

  `upgrade_all_cli`()
  `upgrade_cli`(package_id=None)

class `meta_package_manager.managers.homebrew.` `HomebrewCask`

  Bases: `meta_package_manager.managers.homebrew.Homebrew`

  Cask is now part of Homebrew’s core and extend it.

  `cli_args` = [u'cask']
  `id`

    The `cachedproperty` is used similar to `property`, 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 to `property`, 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__`.

  `requirement` = u'>= 1.1.*'
  `sync`()

    Fetch latest formulas and their metadata.

    Sample of brew cask output:

    > $ brew cask list –versions aerial 1.2beta5 android-file-transfer latest audacity 2.1.2-1453294898 2.1.2 bitbar 1.9.2 firefox 49.0.1 flux 37.7 gimp 2.8.18-x86_64 java 1.8.0_112-b16 tunnelblick 3.6.8_build_4625 3.6.9_build_4685 virtualbox 5.1.8-111374 5.1.10-112026

    > $ brew cask info aerial aerial: 1.2beta5 https://github.com/JohnCoates/Aerial /usr/local/Caskroom/aerial/1.2beta5 (18 files, 6.6M) From: https://github.com/(...)/blob/master/Casks/aerial.rb ==> Name Aerial Screensaver ==> Artifacts Aerial.saver (screen_saver)

    > $ brew cask info firefox firefox: 50.0.1 https://www.mozilla.org/firefox/ /usr/local/Caskroom/firefox/49.0.1 (107 files, 185.3M) From: https://github.com/(...)/blob/master/Casks/firefox.rb ==> Name Mozilla Firefox ==> Artifacts Firefox.app (app)

    > $ brew cask info virtualbox virtualbox: 5.1.10-112026 https://www.virtualbox.org /usr/local/Caskroom/virtualbox/5.1.8-111374 (3 files, 88.8M) /usr/local/Caskroom/virtualbox/5.1.10-112026 (3 files, 89.3M) From: https://github.com/(...)/blob/master/Casks/virtualbox.rb ==> Name Oracle VirtualBox ==> Artifacts VirtualBox.pkg (pkg)

    > $ brew cask info prey prey: 1.6.3 https://preyproject.com/ Not installed From: https://github.com/(...)/blob/master/Casks/prey.rb ==> Name Prey ==> Artifacts prey-mac-1.6.3-x86.pkg (pkg) ==> Caveats Prey requires your API key, found in the bottom-left corner of the Prey web account Settings page, to complete installation. The API key may be set as an environment variable as follows:

    > > API_KEY=”abcdef123456” brew cask install prey

    > $ brew cask info ubersicht ubersicht: 1.0.44 http://tracesof.net/uebersicht/ Not installed From: https://github.com/(...)/blob/master/Casks/ubersicht.rb ==> Name Übersicht ==> Artifacts Übersicht.app (app)

  `upgrade_all_cli`()

    Cask has no way to upgrade all outdated packages.

    See: https://github.com/caskroom/homebrew-cask/issues/4678

  `upgrade_cli`(package_id)

    Install a package.

    TODO: wait for https://github.com/caskroom/homebrew-cask/issues/22647 so we can force a cleanup in one go, as we do above with vanilla Homebrew.

## meta_package_manager.managers.mas module

class `meta_package_manager.managers.mas.` `MAS`

  Bases: `meta_package_manager.base.PackageManager`

  `cli_path` = u'/usr/local/bin/mas'
  `get_version`()
  `name`

    The `cachedproperty` is used similar to `property`, 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([u'macos'])
  `requirement` = u'>= 1.3.1'
  `sync`()
  `upgrade_all_cli`()
  `upgrade_cli`(package_id)

## meta_package_manager.managers.npm module

class `meta_package_manager.managers.npm.` `NPM`

  Bases: `meta_package_manager.base.PackageManager`

  `cli_path` = u'/usr/local/bin/npm'
  `get_version`()
  `name`

    The `cachedproperty` is used similar to `property`, 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([u'macos'])
  `sync`()

    Sample of npm output:

    > $ npm -g –progress=false –json outdated {

    > > “my-linked-package”: {
    > >   “current”: “0.0.0-development”, “wanted”: “linked”, “latest”: “linked”, “location”: “/Users/...”

    > > }, “npm”: {

    > > > “current”: “3.10.3”, “wanted”: “3.10.5”, “latest”: “3.10.5”, “location”: “/Users/...”

    > > }

    > }

  `upgrade_all_cli`()
  `upgrade_cli`(package_id=None)

## meta_package_manager.managers.pip module

class `meta_package_manager.managers.pip.` `Pip`

  Bases: `meta_package_manager.base.PackageManager`

  `get_version`()
  `platforms` = frozenset([u'macos', u'linux'])
  `sync`()

    List outdated packages and their metadata.

    Sample of pip output:

    > $ pip list –outdated ccm (2.1.8, /Users/kdeldycke/ccm) - Latest: 2.1.11 [sdist] coverage (4.0.3) - Latest: 4.1 [wheel] IMAPClient (0.13) - Latest: 1.0.1 [wheel] Logbook (0.10.1) - Latest: 1.0.0 [sdist] mccabe (0.4.0) - Latest: 0.5.0 [wheel] mercurial (3.8.3) - Latest: 3.8.4 [sdist] pylint (1.5.6) - Latest: 1.6.1 [wheel]

  `upgrade_all_cli`()

    Pip lacks support of a proper full upgrade command.

    See: https://github.com/pypa/pip/issues/59

  `upgrade_cli`(package_id)

class `meta_package_manager.managers.pip.` `Pip2`

  Bases: `meta_package_manager.managers.pip.Pip`

  `cli_path` = u'/usr/local/bin/pip2'
  `name`

    The `cachedproperty` is used similar to `property`, 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__`.

class `meta_package_manager.managers.pip.` `Pip3`

  Bases: `meta_package_manager.managers.pip.Pip`

  `cli_path` = u'/usr/local/bin/pip3'
  `name`

    The `cachedproperty` is used similar to `property`, 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__`.

## Module contents

Registration, indexing and cache of package manager definitions.