From e10416fbbc1f51834f2af6347b19a57ff498d184 Mon Sep 17 00:00:00 2001 From: Saikat Karmakar <31238298+Aviksaikat@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:28:12 +0000 Subject: [PATCH] docs: added documentaion on how to define entry-points for ape plugins when using pyproject.toml --- docs/userguides/developing_plugins.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/userguides/developing_plugins.md b/docs/userguides/developing_plugins.md index 199e970cbb..df20cfde69 100644 --- a/docs/userguides/developing_plugins.md +++ b/docs/userguides/developing_plugins.md @@ -103,6 +103,18 @@ entry_points={ ... ``` +If you're using `pyproject.toml` you can register the entry_point like this + +`pyproject.toml`: + +```yml +[...] +# Make it work with cli like ape myplugin +[project.entry-points.ape_cli_subcommands] +ape_myplugin = "ape_myplugin._cli:cli" +[...] +``` + ```{note} Typically, a `_cli.py` module is used instead of a `__init__.py` module for the location of the Click CLI group because it is logically separate from the Python module loading process. ```