diff --git a/Makefile b/Makefile index ce8bd14a..0f46b49a 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 ```