From 523907226c1366494fa3879d80585e355b6fa493 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Thu, 16 Jun 2022 11:57:56 +0400 Subject: [PATCH] Document installation of mpm with brew and with itself. See: https://github.com/kdeldycke/meta-package-manager/issues/527#issuecomment-1157094521 --- changelog.md | 2 +- docs/install.md | 20 ++++++++++++++++++- .../tests/test_cli_install_remove.py | 10 +++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 85a03e683..8e558b22f 100644 --- a/changelog.md +++ b/changelog.md @@ -10,7 +10,7 @@ This version is not released yet and is under active development. - \[mpm,pip,pipx,pacman\] Add `remove` operation. - \[mpm\] Add description in search results. - \[mpm\] Always refilters search results manually to refine gross matchings. -- \[mpm\] Document Arch Linux installation. Refs {issue}`527`. +- \[mpm\] Document `brew` and Arch Linux installation. Refs {issue}`527`. - \[mpm\] Group workflow jobs so new commits cancels in-progress execution triggered by previous commits. - \[mpm\] Run tests on early Python 3.11 releases. diff --git a/docs/install.md b/docs/install.md index 780d8e876..dcd63171b 100644 --- a/docs/install.md +++ b/docs/install.md @@ -40,14 +40,32 @@ If you have difficulties to use `pip`, see [`pip`'s own installation instructions](https://pip.pypa.io/en/stable/installation/). ```` +````{tab-item} brew +An `mpm` formula has been contributed by [@Hasnep](https://github.com/Hasnep) and is [available at `hasnep/tap/meta-package-manager`](https://github.com/Hasnep/homebrew-tap/blob/main/Formula/meta-package-manager.rb): + +```{code-block} shell-session +$ brew install hasnep/tap/meta-package-manager +``` +```` + ````{tab-item} Arch Linux -`mpm` is [available on AUR](https://aur.archlinux.org/packages/meta-package-manager): +An `mpm` package has been contributed by [@autinerd](https://github.com/autinerd) and is [available on AUR](https://aur.archlinux.org/packages/meta-package-manager): ```{code-block} shell-session $ yay -S meta-package-manager ``` ```` +````{tab-item} mpm +In a funny twist, `mpm` can be installed by itself: + +```{code-block} shell-session +$ mpm --brew install meta-package-manager +$ mpm --pip install meta-package-manager +$ mpm --pipx install meta-package-manager +$ mpm --yay install meta-package-manager +``` +```` ````` ````{admonition} Danger: **Misleading package name** diff --git a/meta_package_manager/tests/test_cli_install_remove.py b/meta_package_manager/tests/test_cli_install_remove.py index e31c27a37..86c59619b 100644 --- a/meta_package_manager/tests/test_cli_install_remove.py +++ b/meta_package_manager/tests/test_cli_install_remove.py @@ -29,7 +29,11 @@ def subcmd(): class TestInstallRemove(CLISubCommandTests): """Install and remove operations are siblings and sensible, so we regroup them under - the same test suite.""" + the same test suite. + + Install mpm with itself when we can, so we can test externally contributed packaging. + See: https://github.com/kdeldycke/meta-package-manager/issues/527 + """ strict_selection_match = False """ Install sub-command try each user-selected manager until it find one providing @@ -48,7 +52,8 @@ def test_no_package_id(self, invoke, operation): "apm": "markdown-pdf", "apt": "wget", "apt-mint": "exiftool", - "brew": "jpeginfo", + # https://github.com/Hasnep/homebrew-tap/blob/main/Formula/meta-package-manager.rb + "brew": "hasnep/tap/meta-package-manager", "cargo": "colorous", "cask": "pngyu", "choco": "ccleaner", @@ -67,7 +72,6 @@ def test_no_package_id(self, invoke, operation): "steamcmd": "740", "vscode": "tamasfe.even-better-toml", "yarn": "markdown", - # Install mpm with itself: # https://aur.archlinux.org/packages/meta-package-manager "yay": "meta-package-manager", "yum": "usd",