From d61b89f48f05b22a013f9b525ada22aa8c754ade Mon Sep 17 00:00:00 2001 From: Benjamin Hackl Date: Sun, 26 Jan 2025 22:21:26 +0100 Subject: [PATCH] update entrypoint config in plugin docs + tests --- docs/source/plugins.rst | 11 ++++++----- tests/test_plugins/test_plugins.py | 16 +++++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/source/plugins.rst b/docs/source/plugins.rst index 7bd8c0061c..c87f6ee8ca 100644 --- a/docs/source/plugins.rst +++ b/docs/source/plugins.rst @@ -96,14 +96,15 @@ The only requirement of manim plugins is that they specify an entry point with the group, ``"manim.plugins"``. This allows Manim to discover plugins available in the user's environment. Everything regarding the plugin's directory structure, build system, and naming are completely up to your -discretion as an author. The aforementioned template plugin is only a model -using Poetry since this is the build system Manim uses. The plugin's `entry -point `_ can be -specified in Poetry as: +discretion as an author. + +The standard way to specify an entry point (see +`the Python packaging guide `__ +for details) is to include the following in your ``pyproject.toml``: .. code-block:: toml - [tool.poetry.plugins."manim.plugins"] + [project.entry-points."manim.plugins"] "name" = "object_reference" .. versionremoved:: 0.18.1 diff --git a/tests/test_plugins/test_plugins.py b/tests/test_plugins/test_plugins.py index 428dbd732c..d5fc0a01f2 100644 --- a/tests/test_plugins/test_plugins.py +++ b/tests/test_plugins/test_plugins.py @@ -11,21 +11,19 @@ plugin_pyproject_template = textwrap.dedent( """\ - [tool.poetry] + [project] name = "{plugin_name}" - authors = ["ManimCE Test Suite"] + authors = [{name = "ManimCE Test Suite"},] version = "0.1.0" - description = "" + description = "A fantastic Manim plugin" + requires-python = ">=3.9" - [tool.poetry.dependencies] - python = "^3.7" - - [tool.poetry.plugins."manim.plugins"] + [project.entry-points."manim.plugins"] "{plugin_name}" = "{plugin_entrypoint}" [build-system] - requires = ["poetry-core>=1.0.0"] - build-backend = "poetry.core.masonry.api" + requires = ["hatchling"] + build-backend = "hatchling.build" """, )