summaryrefslogtreecommitdiff
path: root/docs/userguide
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-08-06 19:04:22 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-08-06 19:04:22 +0100
commitc14fea445bf2ad41ffe2057c7e64192aa30af4df (patch)
tree72c30f5e70c050c09a82c3797c9e3e598549f973 /docs/userguide
parent05a69d8ee229824651e64ce33e2b56f3676060f8 (diff)
parent661c3b6067ba2cf5407ab3aa06b36f0cbabeaf3e (diff)
downloadpython-setuptools-git-c14fea445bf2ad41ffe2057c7e64192aa30af4df.tar.gz
docs: Update quickstart.rst (#3464)
Diffstat (limited to 'docs/userguide')
-rw-r--r--docs/userguide/quickstart.rst22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst
index 060288d8..24c71b8e 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
@@ -188,12 +189,11 @@ found, as shown in the example below:
[options]
packages = find: # OR `find_namespace:` if you want to use namespaces
- [options.packages.find] # (always `find` even if `find_namespace:` 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_namespace:` 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
.. tab:: setup.py [#setup.py]_
@@ -204,18 +204,18 @@ found, as shown in the example below:
setup(
# ...
packages=find_packages(
- where='.',
- include=['mypackage*'], # ["*"] by default
+ # All keyword arguments below are optional:
+ 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`.