diff options
| author | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-05-20 11:05:47 +0530 |
|---|---|---|
| committer | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-05-20 11:05:47 +0530 |
| commit | 13fb2a1d96502b02e36b30e8e3d87007c021caf5 (patch) | |
| tree | 59722d3c27ea6215755814422aa09daec0eadd97 /docs | |
| parent | 915907dce7df2181eea1cc6929907bc71cbf9c56 (diff) | |
| download | python-setuptools-git-13fb2a1d96502b02e36b30e8e3d87007c021caf5.tar.gz | |
Added two `mypkg` directories in the example directory trees
Since the previous example on manually specifying `packages` and
`package_dir` alludes to two packages, `mypkg1` and `mypkg2`, IMHO it
would be more consistent to continue this and show two packages in the
directory trees for the src-layout and flat-layout, instead of showing a
single package `mypkg`. This would also make it more clear that multiple
packages are allowed.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/userguide/package_discovery.rst | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst index 34d5a8ef..d80d8ddc 100644 --- a/docs/userguide/package_discovery.rst +++ b/docs/userguide/package_discovery.rst @@ -158,10 +158,14 @@ directory:: ├── setup.cfg # or setup.py ├── ... └── src/ - └── mypkg/ + ├── mypkg1/ + │ ├── __init__.py + │ ├── ... + │ └── mymodule1.py + └── mypkg2/ ├── __init__.py ├── ... - └── mymodule.py + └── mymodule2.py This layout is very handy when you wish to use automatic discovery, since you don't have to worry about other Python files or folders in your @@ -183,10 +187,14 @@ The package folder(s) are placed directly under the project root:: ├── pyproject.toml ├── setup.cfg # or setup.py ├── ... - └── mypkg/ + ├── mypkg1/ + │ ├── __init__.py + │ ├── ... + │ └── mymodule1.py + └── mypkg2/ ├── __init__.py ├── ... - └── mymodule.py + └── mymodule2.py This layout is very practical for using the REPL, but in some situations it can be more error-prone (e.g. during tests or if you have a bunch |
