From 32111b30fc09dcc1f1c9475919a6837a9d32547f Mon Sep 17 00:00:00 2001 From: Christopher O'Brien Date: Wed, 13 Sep 2023 18:13:30 -0400 Subject: [PATCH 1/2] clean up install instructions in README --- Makefile | 3 +++ README.md | 50 ++++++++++++++++++-------------------------------- 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index b8a3370e..40e382b5 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,9 @@ install: build ## Installs using the default python for the current user @$(PYTHON) -B -m pip.__main__ \ install --no-deps --user -I \ dist/$(PROJECT)-$(VERSION)-py3-none-any.whl + @mkdir -p ~/.koji/plugins + @rm -f ~/.koji/plugins/kojismokydingometa.py + @ln -s `$(PYTHON) -c 'import koji_cli_plugins.kojismokydingometa as ksdm ; print(ksdm.__file__);'` ~/.koji/plugins/kojismokydingometa.py ##@ Cleanup diff --git a/README.md b/README.md index 74c48afb..b6d27ef1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Overview -[![Build Status](https://github.com/obriencj/koji-smoky-dingo/actions/workflows/tox.yml/badge.svg?branch=master)](https://github.com/obriencj/koji-smoky-dingo/actions/workflows/tox.yml) - Koji Smoky Dingo is a collection of client command-line plugins for the [Koji] build system, and a set of utility modules for writing your own commands or scripts. @@ -95,57 +93,45 @@ included spec to produce an RPM and install that. ```bash make clean rpm -dnf install dist/noarch/python3-kojismokydingo-2.1.0-1.fc38.noarch.rpm +dnf install dist/noarch/python3-kojismokydingo-2.2.0-0.fc38.noarch.rpm ``` ### As a System-wide Wheel via Pip -Using traditional setuptools or pip installation methods can also -achieve this by specifying the specific root or prefix parameter +The pip3 tool can also achieve this by specifying the specific root or +prefix parameter ```bash -python3 setup.py bdist_wheel -pip3 install --prefix /usr -I dist/kojismokydingo-2.1.0-py3-none-any.whl +make clean build +pip3 install --prefix /usr -I dist/kojismokydingo-2.2.0-py3-none-any.whl ``` - -### As a User-only Wheel via Pip - -However, if you only want the plugin available for yourself, you can -install it anywhere and tell koji to look in that particular -`site-package/koji_cli_plugins` instance +or you can install the most recent release straight from PyPI ```bash -python3 setup.py bdist_wheel -pip3 install --user -I dist/kojismokydingo-2.1.0-py3-none-any.whl +pip3 install --prefix /usr -I kojismokydingo ``` -Additionally, you can install straight from PyPI -```bash -pip3 install kojismokydingo --user -``` +### As a User-only Wheel via Pip -And the following setting in ~/.koji/config assuming Python version -3.8 -- read the output of the install command above to verify your -install path. Note that the section title needs to match your koji -profile, and that you need to configure this setting for each profile -you'll want to use the meta plugin with. +If you only want the plugin available for yourself, you can use the +`install` target of the Makefile to easily build the wheel, install it +using pip3, then symlink the meta plugin into your koji user plugins +directory. +```bash +make clean install ``` -[koji] -plugin_paths = ~/.local/lib/python3.8/site-packages/koji_cli_plugins/ -``` - -With koji >= [1.18], the meta plugin can also be symlinked into -`~/.koji/plugins` -[1.18]: https://docs.pagure.org/koji/release_notes/release_notes_1.18/ +or you can install the most recent release straight from PyPI, and +then copy the meta plugin into place ```bash +pip3 install --user -I kojismokydingo mkdir -p ~/.koji/plugins -ln -s ~/.local/lib/python$(python3 -c 'import sys; print("{}.{}".format(*sys.version_info))')/site-packages/koji_cli_plugins/kojismokydingometa.py ~/.koji/plugins +cp $(python3 -c 'import koji_cli_plugins.kojismokydingometa as k ; print(k.__file__);' ~/.koji/plugins ``` From b897c005dbaf407bf98a1e2c8677b1ecf5fe67f1 Mon Sep 17 00:00:00 2001 From: Christopher O'Brien Date: Thu, 14 Sep 2023 21:21:45 -0400 Subject: [PATCH 2/2] shush --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 40e382b5..0f46b49a 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ report-python: ##@ Local Build and Install build: clean-built report-python flake8 ## Produces a wheel using the default system python - @tox -e build + @tox -qe build install: build ## Installs using the default python for the current user @@ -87,27 +87,27 @@ packaging-test: packaging-build ## Launches all containerized tests ##@ Testing test: clean requires-tox ## Launches tox - @tox + @tox -q bandit: requires-tox ## Launches bandit via tox - @tox -e bandit + @tox -qe bandit flake8: requires-tox ## Launches flake8 via tox - @tox -e flake8 + @tox -qe flake8 mypy: requires-tox ## Launches mypy via tox - @tox -e mypy + @tox -qe mypy coverage: requires-tox ## Collects coverage report - @tox -e coverage + @tox -qe coverage quick-test: requires-tox flake8 ## Launches nosetest using the default python - @tox -e quicktest + @tox -qe quicktest ##@ RPMs @@ -138,7 +138,7 @@ $(ARCHIVE): requires-git ##@ Documentation docs: clean-docs requires-tox docs/overview.rst ## Build sphinx docs - @tox -e sphinx + @tox -qe sphinx overview: docs/overview.rst ## rebuilds the overview from README.md