Skip to content

Commit 13fb2a1

Browse files
committed
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.
1 parent 915907d commit 13fb2a1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/userguide/package_discovery.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,14 @@ directory::
158158
├── setup.cfg # or setup.py
159159
├── ...
160160
└── src/
161-
└── mypkg/
161+
├── mypkg1/
162+
│   ├── __init__.py
163+
│   ├── ...
164+
│   └── mymodule1.py
165+
└── mypkg2/
162166
├── __init__.py
163167
├── ...
164-
└── mymodule.py
168+
└── mymodule2.py
165169
166170
This layout is very handy when you wish to use automatic discovery,
167171
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::
183187
├── pyproject.toml
184188
├── setup.cfg # or setup.py
185189
├── ...
186-
└── mypkg/
190+
├── mypkg1/
191+
│   ├── __init__.py
192+
│   ├── ...
193+
│   └── mymodule1.py
194+
└── mypkg2/
187195
├── __init__.py
188196
├── ...
189-
└── mymodule.py
197+
└── mymodule2.py
190198
191199
This layout is very practical for using the REPL, but in some situations
192200
it can be more error-prone (e.g. during tests or if you have a bunch

0 commit comments

Comments
 (0)