diff options
author | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-06-08 20:15:08 +0530 |
---|---|---|
committer | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-06-08 21:34:35 +0530 |
commit | 6528a4c14b278e375473b66a865f0892f60cf5c0 (patch) | |
tree | a7b8d912e7a6769ec91f65714d7302a433c18e98 /docs/userguide/entry_point.rst | |
parent | d7234012ffe4ce13360c1c2a7e8739b6c473d3e0 (diff) | |
download | python-setuptools-git-6528a4c14b278e375473b66a865f0892f60cf5c0.tar.gz |
Added `pyproject.toml` snippet for console scripts example
Diffstat (limited to 'docs/userguide/entry_point.rst')
-rw-r--r-- | docs/userguide/entry_point.rst | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 54d53a20..2e3bf7e1 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -52,7 +52,7 @@ user-friendly name for installers of the package to execute. Installers like pip will create wrapper scripts to execute a function. In the above example, to create a command ``hello-world`` that invokes ``timmins.hello_world``, add a console script entry point to -``setup.cfg``: +your configuration: .. tab:: setup.cfg @@ -80,6 +80,13 @@ above example, to create a command ``hello-world`` that invokes } ) +.. tab:: pyproject.toml (**EXPERIMENTAL**) [#experimental]_ + + .. code-block:: toml + + [project.scripts] + hello-world = "timmins:hello_world" + After installing the package, a user may invoke that function by simply calling ``hello-world`` on the command line. @@ -179,3 +186,10 @@ In this case, the ``hello-world`` script is only viable if the ``pretty-printer` extra is indicated, and so a plugin host might exclude that entry point (i.e. not install a console script) if the relevant extra dependencies are not installed. + +---- + +.. [#experimental] + Support for specifying package metadata and build configuration options via + ``pyproject.toml`` is experimental and might change + in the future. See :doc:`/userguide/pyproject_config`. |