details: https://code.tryton.org/hatch-tryton/commit/b896a2beb4fd
branch: default
user: Cédric Krier <[email protected]>
date: Fri Mar 13 07:56:29 2026 +0100
description:
Add example in README.rst
diffstat:
README.rst | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diffs (44 lines):
diff -r 4c645676a144 -r b896a2beb4fd README.rst
--- a/README.rst Thu Mar 12 22:55:53 2026 +0100
+++ b/README.rst Fri Mar 13 07:56:29 2026 +0100
@@ -3,3 +3,40 @@
============
A ``hatchling`` plugin to manage Tryton dependencies.
+
+Usage
+=====
+
+#. Include it as a plugin to your ``pyproject.toml``:
+
+ .. code:: toml
+
+ [build-system]
+ requires = ['hatchling', 'hatch-tryton']
+ build-backend = 'hatchling.build'
+
+#. Mark your ``version``, ``dependencies``, ``optional-dependencies``,
+ ``readme`` and ``authors`` fields as ``dynamic``:
+
+ .. code:: toml
+
+ [project]
+ dynamic = ['version', 'dependencies', 'optional-dependencies',
'authors', 'readme']
+
+#. And configure the plugin:
+
+ .. code:: toml
+
+ [tool.hatch.metadata.hooks.tryton]
+ config = 'tryton.cfg' # the relative path to the ``tryton.cfg``
+ prefixes = {} # a mapping between module name and package prefix
+ dependencies = [] # the list of dependencies that are not Tryton modules
+ tryton_dependencies = [] # the list of dependencies that are Tryton
modules but not defined in ``tryton.cfg``
+ readme = '' # the relative path to the readme file
+ copyright = '' # the relative path to the copyright file
+
+ [tool.hatch.metadata.hooks.tryton.optional-dependencies]
+ # The optional dependencies that are not Tryton modules
+
+ [tool.hatch.metadata.hooks.tryton.tryton-optional-dependencies]
+ # The optional dependencies that are Tryton modules but not defined in
``tryton.cfg`` as ``extras_depend`` as ``test`` option.