From 0ad91e0c4d2c056949cd74f589201883c53014b8 Mon Sep 17 00:00:00 2001 From: Evan Kohilas Date: Tue, 19 Nov 2024 12:08:51 +1100 Subject: [PATCH] make clear that the recommended approach is dev installing --- source/discussions/src-layout-vs-flat-layout.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/discussions/src-layout-vs-flat-layout.rst b/source/discussions/src-layout-vs-flat-layout.rst index f13dac54c..faf90b5c8 100644 --- a/source/discussions/src-layout-vs-flat-layout.rst +++ b/source/discussions/src-layout-vs-flat-layout.rst @@ -88,7 +88,10 @@ Running a command-line interface from source with src-layout Due to the firstly mentioned specialty of the src layout, a command-line interface can not be run directly from the :term:`source tree `. -To run a command-line interface directly, you can either: +To run a command-line interface directly, you can install the package in +:doc:`Development Mode ` for testing purposes. + +Since this can be unpractical in some situations, you can also either: Run :file:`__main__.py` via: @@ -97,10 +100,8 @@ Run :file:`__main__.py` via: cd src/ python -m awesome_package -Or install the package in :doc:`Development Mode ` -for testing purposes. Since this can be unpractical in some situations, -a workaround could be to prepend the package folder to Python's -:py:data:`sys.path` when called via its :file:`__main__.py` file: +Or prepend the package folder to Python's :py:data:`sys.path` when called via its +:file:`__main__.py` file: .. code-block:: python