InstallationΒΆ

From packagesΒΆ

mpm is available on several popular package managers:

Yo dawg, I herd you like package managers...

Easiest way is to install pipx, then use it to install mpm:

$ pipx install meta-package-manager

Note

pipx is to pip what npx is to npm: a clean way to install and run Python applications in isolated environments.

You can install the latest stable release and its dependencies with a simple pip call:

$ python -m pip install meta-package-manager

On some system, due to the Python 2.x to 3.x migration, you’ll have to call python3 directly:

$ python3 -m pip install meta-package-manager

Other variations includes:

$ pip install meta-package-manager
$ pip3 install meta-package-manager

If you have difficulties to use pip, see pip’s own installation instructions.

Meta Package Manager is available as an official Homebrew formula, so you just need to:

$ brew install meta-package-manager

Meta Package Manager is available in the main repository of Scoop, so you just need to:

> scoop install main/meta-package-manager

An mpm package has been contributed by @autinerd and is available on AUR and can be installed with any AUR helper:

$ pacaur -S meta-package-manager
$ pacman -S meta-package-manager
$ paru -S meta-package-manager
$ yay -S meta-package-manager

Danger

Danger: Misleading package name Angry package

There is a mpm Python module on PyPi that has nothing to do with this project. Avoid it!

The real package is named meta-package-manager. Only the latter provides the mpm CLI you’re looking for.

BinariesΒΆ

Binaries are compiled at each release, so you can skip the installation process above and download the standalone executables directly.

This is the preferred way of testing mpm without polluting your machine. They also offer the possibility of running the CLI on older systems not supporting the minimal Python version required by mpm.

All links above points to the latest released version of mpm.

See also

Older releases If you need to test previous versions for regression, compatibility or general troubleshooting, you’ll find the old binaries attached as assets to past releases on GitHub.

Caution

Development builds Each commit to the development branch triggers the compilation of binaries. This way you can easily test the bleeding edge version of mpm and report any issue.

Look at the list of latest binary builds. Then select the latest Build & release/release.yaml workflow run and download the binary artifact corresponding to your platform and architecture.

Note

ABI targets

$ file ./mpm*
./mpm-linux-x64.bin:   ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=d0a8ae1ffa469465a836c1505504d1b1c75725b0, for GNU/Linux 3.2.0, stripped
./mpm-macos-arm64.bin: Mach-O 64-bit executable arm64
./mpm-macos-x64.bin:   Mach-O 64-bit executable x86_64
./mpm-windows-x64.exe: PE32+ executable (console) x86-64, for MS Windows

Self-bootstrappingΒΆ

In a funny twist, mpm can be installed with itself.

Which means there is a way to bootstrap its deployment on an unknown system. Just download the binary corresponding to your platform and architecture:

$ curl --fail --remote-name https://github.com/kdeldycke/meta-package-manager/releases/latest/download/mpm-macos-x64.bin
################################################### 100.0%
$ file ./mpm-macos-x64.bin
./mpm-macos-x64.bin: Mach-O 64-bit executable x86_64
$ chmod +x ./mpm-macos-x64.bin
$ ./mpm-macos-x64.bin --version
mpm, version 5.7.0

Then let mpm discovers which package managers are available on your machine and choose the one providing a path to mpm installation:

$ ./mpm-macos-x64.bin install meta-package-manager
warning: Skip unavailable cargo manager.
warning: Skip unavailable steamcmd manager.
Installation priority: brew > cask > composer > gem > mas > npm > pip > pipx > vscode > yarn
warning: No meta-package-manager package found on brew.
warning: No meta-package-manager package found on cask.
warning: No meta-package-manager package found on composer.
warning: No meta-package-manager package found on gem.
warning: No meta-package-manager package found on mas.
warning: No meta-package-manager package found on npm.
warning: pip does not implement search operation.
meta-package-manager existence unconfirmed, try to directly install it...
Install meta-package-manager package with pip...
Collecting meta-package-manager
  Downloading meta_package_manager-5.11.1-py3-none-any.whl (161 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.5/161.5 kB 494.7 kB/s eta 0:00:00
(...)
Installing collected packages: (...) meta-package-manager
Successfully installed (...) meta-package-manager-5.11.1

And now you can remove the local binary and enjoy the system-wide mpm that was installed by itself:

$ rm -f ./mpm-macos-x64.bin
$ which mpm
/opt/homebrew/bin/mpm
$ mpm --version
mpm, version 5.11.1

Tip

At this moment, mpm can be installed with itself via these managers:

$ mpm --brew install meta-package-manager
$ mpm --pacaur install meta-package-manager
$ mpm --pacman install meta-package-manager
$ mpm --paru install meta-package-manager
$ mpm --pip  install meta-package-manager
$ mpm --pipx install meta-package-manager
$ mpm --yay  install meta-package-manager

Run mpmΒΆ

Meta package manager should now be available system-wide:

$ mpm --version
mpm, version 4.13.0
(...)

If not, you can directly execute the module from Python:

$ python -m meta_package_manager --version
mpm, version 4.13.0
(...)

Or on some systems:

$ python3 -m meta_package_manager --version
mpm, version 4.13.0
(...)

Password prompts and sudoΒΆ

The majority of package managers on Linux requires sudo to perform system-wide operations.

On other OSes you’ll be prompted to enter your password to install kernel extensions:

$ brew install --cask macfuse
==> Caveats
macfuse requires a kernel extension to work.
If the installation fails, retry after you enable it in:
  System Preferences β†’ Security & Privacy β†’ General

For more information, refer to vendor documentation or this Apple Technical Note:
  https://developer.apple.com/library/content/technotes/tn2459/_index.html

==> Downloading https://github.com/osxfuse/osxfuse/releases/download/macfuse-4.2.5/macfuse-4.2.5.dmg
Already downloaded: /Users/kde/Library/Caches/Homebrew/downloads/d7961d772f16bad95962f1a780b545a5dbb4788ec6e1ec757994bb5296397b1c--macfuse-4.2.5.dmg
==> Installing Cask macfuse
==> Running installer for macfuse; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
Password:

Both cases are not handled gracefully by mpm, which doesn’t support (yet) interactive password management and capture.

A workaround on Linux is to install mpm with sudo, so you’ll be able to invoke it with sudo too:

$ sudo python3 -m pip install meta-package-manager
(...)
$ sudo python3 -m meta_package_manager upgrade
(...)

Shell completionΒΆ

Completion for popular shell rely on Click feature.

Add this to ~/.bashrc:

eval "$(_MPM_COMPLETE=bash_source mpm)"

Add this to ~/.zshrc:

eval "$(_MPM_COMPLETE=zsh_source mpm)"

Add this to ~/.config/fish/completions/mpm.fish:

eval (env _MPM_COMPLETE=fish_source mpm)

Alternatively, export the generated completion code as a static script to be executed:

$ _MPM_COMPLETE=bash_source mpm > ~/.mpm-complete.bash

Then source it from ~/.bashrc:

. ~/.mpm-complete.bash
$ _MPM_COMPLETE=zsh_source mpm > ~/.mpm-complete.zsh

Then source it from ~/.zshrc:

. ~/.mpm.zsh
_MPM_COMPLETE=fish_source mpm > ~/.config/fish/completions/mpm.fish

Python dependenciesΒΆ

FYI, here is a graph of Python package dependencies:

        flowchart TD
    classDef missing stroke-dasharray: 5
    beartype["beartype\n0.18.5"]
    boltons["boltons\n24.0.0"]
    boolean-py["boolean.py\n4.0"]
    bracex["bracex\n2.4"]
    certifi["certifi\n2024.7.4"]
    charset-normalizer["charset-normalizer\n3.3.2"]
    click-extra["click-extra\n4.9.0"]
    click_0["click\n8.1.7"]
    cloup["cloup\n3.0.5"]
    commentjson["commentjson\n0.9.0"]
    cyclonedx-python-lib["cyclonedx-python-lib\n7.5.1"]
    defusedxml["defusedxml\n0.7.1"]
    idna["idna\n3.7"]
    isodate["isodate\n0.6.1"]
    lark-parser["lark-parser\n0.7.8"]
    license-expression["license-expression\n30.3.0"]
    mergedeep["mergedeep\n1.3.4"]
    meta-package-manager["meta-package-manager\n5.18.0"]
    more-itertools["more-itertools\n10.3.0"]
    packageurl-python["packageurl-python\n0.15.6"]
    ply["ply\n3.11"]
    py-serializable["py-serializable\n1.1.0"]
    pyparsing["pyparsing\n3.1.2"]
    pyyaml["PyYAML\n6.0.1"]
    rdflib["rdflib\n7.0.0"]
    requests["requests\n2.32.3"]
    semantic-version["semantic-version\n2.10.0"]
    six["six\n1.16.0"]
    sortedcontainers["sortedcontainers\n2.4.0"]
    spdx-tools["spdx-tools\n0.8.2"]
    tabulate["tabulate\n0.9.0"]
    tomli-w["tomli_w\n1.0.0"]
    uritools["uritools\n4.0.3"]
    urllib3["urllib3\n2.2.2"]
    wcmatch["wcmatch\n8.5.2"]
    xmltodict["xmltodict\n0.13.0"]
    click-extra -- "~=0.13.0" --> xmltodict
    click-extra -- "~=0.9" --> tabulate
    click-extra -- "~=0.9.0" --> commentjson
    click-extra -- "~=1.3.4" --> mergedeep
    click-extra -- "~=2.32.3" --> requests
    click-extra -- "~=24.0.0" --> boltons
    click-extra -- "~=3.0.5" --> cloup
    click-extra -- "~=6.0.0" --> pyyaml
    click-extra -- "~=8.1.4" --> click_0
    click-extra -- "~=8.5" --> wcmatch
    cloup -- ">=8.0,<9.0" --> click_0
    commentjson -- ">=0.7.1,<0.8.0" --> lark-parser
    cyclonedx-python-lib -- ">=0.11,<2" --> packageurl-python
    cyclonedx-python-lib -- ">=1.1.0,<2.0.0" --> py-serializable
    cyclonedx-python-lib -- ">=2.4.0,<3.0.0" --> sortedcontainers
    cyclonedx-python-lib -- ">=30,<31" --> license-expression
    isodate -- "any" --> six
    license-expression -- ">=4.0" --> boolean-py
    meta-package-manager -- "~=0.13.0" --> xmltodict
    meta-package-manager -- "~=0.15.0" --> packageurl-python
    meta-package-manager -- "~=0.8.2" --> spdx-tools
    meta-package-manager -- "~=0.9.0" --> tabulate
    meta-package-manager -- "~=1.0.0" --> tomli-w
    meta-package-manager -- "~=10.3.0" --> more-itertools
    meta-package-manager -- "~=24.0.0" --> boltons
    meta-package-manager -- "~=4.9.0" --> click-extra
    meta-package-manager -- "~=7.5.1" --> cyclonedx-python-lib
    py-serializable -- ">=0.7.1,<0.8.0" --> defusedxml
    rdflib -- ">=0.6.0,<0.7.0" --> isodate
    rdflib -- ">=2.1.0,<4" --> pyparsing
    requests -- ">=1.21.1,<3" --> urllib3
    requests -- ">=2,<4" --> charset-normalizer
    requests -- ">=2.5,<4" --> idna
    requests -- ">=2017.4.17" --> certifi
    spdx-tools -- "any" --> beartype
    spdx-tools -- "any" --> click_0
    spdx-tools -- "any" --> license-expression
    spdx-tools -- "any" --> ply
    spdx-tools -- "any" --> pyyaml
    spdx-tools -- "any" --> rdflib
    spdx-tools -- "any" --> semantic-version
    spdx-tools -- "any" --> uritools
    spdx-tools -- "any" --> xmltodict
    wcmatch -- ">=2.1.1" --> bracex