From 0d3843dc44cf2ab843bea7d8e813f05effde5b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Mon, 25 Jul 2022 08:11:03 +0200 Subject: Update quickstart.rst --- docs/userguide/quickstart.rst | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'docs/userguide') diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index 6c39c352..e45bde0e 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -186,14 +186,12 @@ found, as shown in the example below: .. code-block:: ini [options] - packages = find: # OR `find_namespaces:` if you want to use namespaces + packages = find: # OR `find_namespaces:` if you want to use namespaces - [options.packages.find] # (always `find` even if `find_namespaces:` was used before) - # This section is optional - # Each entry in this section is optional, and if not specified, the default values are: - # `where=.`, `include=*` and `exclude=` (empty). - include=mypackage* - exclude=mypackage.tests* + [options.packages.find] # (always `find` even if `find_namespaces:` was used before) + where=src # . by default + include=mypackage* # * by default + exclude=mypackage.tests* # empty by default .. tab:: setup.py [#setup.py]_ @@ -204,18 +202,17 @@ found, as shown in the example below: setup( # ... packages=find_packages( - where='.', - include=['mypackage*'], # ["*"] by default + where='src', # '.' by default + include=['mypackage*'], # ['*'] by default exclude=['mypackage.tests'], # empty by default ), # ... ) When you pass the above information, alongside other necessary information, -``setuptools`` walks through the directory specified in ``where`` (omitted -here as the package resides in the current directory) and filters the packages +``setuptools`` walks through the directory specified in ``where`` (defaults to ``.``) and filters the packages it can find following the ``include`` patterns (defaults to ``*``), then it removes -those that match the ``exclude`` patterns and returns a list of Python packages. +those that match the ``exclude`` patterns (defaults to empty) and returns a list of Python packages. For more details and advanced use, go to :ref:`package_discovery`. -- cgit v1.2.1 From 661c3b6067ba2cf5407ab3aa06b36f0cbabeaf3e Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Sat, 6 Aug 2022 18:04:25 +0100 Subject: quickstart docs: Add comment about optional `packages.find` --- docs/userguide/quickstart.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/userguide') diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst index e45bde0e..8bafc618 100644 --- a/docs/userguide/quickstart.rst +++ b/docs/userguide/quickstart.rst @@ -176,6 +176,7 @@ found, as shown in the example below: # OR [tool.setuptools.packages.find] + # All the following settings are optional: where = ["src"] # ["."] by default include = ["mypackage*"] # ["*"] by default exclude = ["mypackage.tests*"] # empty by default @@ -189,6 +190,7 @@ found, as shown in the example below: packages = find: # OR `find_namespaces:` if you want to use namespaces [options.packages.find] # (always `find` even if `find_namespaces:` was used before) + # This section is optional as well as each of the following options: where=src # . by default include=mypackage* # * by default exclude=mypackage.tests* # empty by default @@ -202,6 +204,7 @@ found, as shown in the example below: setup( # ... packages=find_packages( + # All keyword arguments below are optional: where='src', # '.' by default include=['mypackage*'], # ['*'] by default exclude=['mypackage.tests'], # empty by default -- cgit v1.2.1