Skip to content

Commit c3c1ff7

Browse files
authored
note an alternative for running src packages locally.
1 parent 3dc5d16 commit c3c1ff7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

source/discussions/src-layout-vs-flat-layout.rst

+12-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,18 @@ Running a command-line interface from source with src-layout
8686
============================================================
8787

8888
Due to the firstly mentioned specialty of the src layout, a command-line
89-
interface can not be run directly from the :term:`source tree <Project Source Tree>`,
90-
but requires installation of the package in
91-
:doc:`Development Mode <setuptools:userguide/development_mode>`
89+
interface can not be run directly from the :term:`source tree <Project Source Tree>`.
90+
91+
To run a command-line interface directly, you can either:
92+
93+
Run :file:`__main__.py` via:
94+
95+
.. code-block:: bash
96+
97+
cd src/
98+
python -m awesome_package
99+
100+
Or install the package in :doc:`Development Mode <setuptools:userguide/development_mode>`
92101
for testing purposes. Since this can be unpractical in some situations,
93102
a workaround could be to prepend the package folder to Python's
94103
:py:data:`sys.path` when called via its :file:`__main__.py` file:

0 commit comments

Comments
 (0)