From cab8f045c53a4d306e670aca1dee3d7939e99ec7 Mon Sep 17 00:00:00 2001 From: Nig3l Date: Mon, 3 Feb 2025 13:10:31 +0100 Subject: [PATCH] Add new plugin install methods Signed-off-by: Nig3l --- docs/source/plugins.rst | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index d512e55e9..61a4e327b 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -145,9 +145,29 @@ To make your plugin available to rez, you can install it directly under Add the source path to the REZ_PLUGIN_PATH environment variable in order to make your plugin available to rez. -3. Create a setup.py +3. Add entry points to pyproject.toml -To make your plugin available to rez, you can also create a ``setup.py`` file +To make your plugin available to rez, you can also create an entry points section in your +``pyproject.toml`` file, that will allow you to install your plugin with `pip install` command. + +.. code-block:: toml + :caption: pyproject.toml + + [build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + + [project] + name = "foo" + version = "0.1.0" + + [project.entry-points."rez.plugins"] + foo_cmd = "foo" + + +4. Create a setup.py + +To make your plugin available to rez, you can also create a ``setup.py`` file, that will allow you to install your plugin with `pip install` command. .. code-block:: python