summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralvyjudy <alvyjudy@gmail.com>2020-05-27 11:08:45 -0400
committeralvyjudy <alvyjudy@gmail.com>2020-05-28 13:32:31 -0400
commit45e784678b46636b7152ad7557d0757c3dfefaec (patch)
treeb74c74ea80f4804313d3efa0667e2a9b81662828
parent1639d010a7469ca6cabf49d038dfcfb4a4472a3d (diff)
downloadpython-setuptools-git-45e784678b46636b7152ad7557d0757c3dfefaec.tar.gz
docs: update entry point userguide
-rw-r--r--docs/userguide/entry_point.txt32
1 files changed, 19 insertions, 13 deletions
diff --git a/docs/userguide/entry_point.txt b/docs/userguide/entry_point.txt
index a23d223b..5772698e 100644
--- a/docs/userguide/entry_point.txt
+++ b/docs/userguide/entry_point.txt
@@ -34,9 +34,10 @@ manner, without applying any magic:
python -m mypkg.helloworld
-But entry point simplifies this process and would create a wrapper script around
-your function, making it behave more natively. To do that, add the following
-lines to your ``setup.cfg`` or ``setup.py``:
+But entry point simplifies the call and would create a wrapper script around
+your function, making it behave more natively (you type in ``helloworld`` and
+the ``helloworld`` function residing inside ``__init__.py`` is executed!). To
+accomplish that, add the following lines to your ``setup.cfg`` or ``setup.py``:
.. code-block:: ini
@@ -56,22 +57,27 @@ lines to your ``setup.cfg`` or ``setup.py``:
"""
)
-The syntax for your entry points is specified as follows
+The syntax for entry points is specified as follows:
.. code-block::
[<type>]
- <name> = [<package>.<subpackage>.]<module>:<function>
+ <name> = [<package>.<subpackage>.]<module>[:<object>.<object>]
-where ``name`` is the name for the script you want to create and the left hand
+where ``name`` is the name for the script you want to create, the left hand
side of ``:`` is the module that contains your function and the right hand
-side is the function you wish to wrap. ``type`` specifies the type of script
-you want to create. ``setuptools`` currently supports either ``[console_script]``
-and ``[gui_script]`` (DOUBLE CHECK ON THIS).
-
-After installation, you will be able to invoke that function simply calling
-``helloworld`` on your command line. It will also do command line options parsing
-for you!
+side is the object you want to invoke (e.g. a function). ``type`` specifies the
+type of script you want to create. ``setuptools`` currently supports either
+``[console_script]`` and ``[gui_script]``.
+
+.. note::
+ the syntax is not limited to ``INI`` string as demonstrated above. You can
+ also pass in the values in the form of a dictionary or list. Check out
+ :ref:`keyword reference <keywords_ref>` for more details
+
+After installation, you will be able to invoke that function by simply calling
+``helloworld`` on your command line. It will even do command line argument
+parsing for you!
Dynamic discovery of services and plugins
=========================================