From 589f38ab2c212d439f1a84013a920829a5b4e4bd Mon Sep 17 00:00:00 2001 From: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:34:01 -0700 Subject: [PATCH] mavproxy: Document interactive development of mavproxy * Use a venv and develop mode from setup.py Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com> --- .../docs/development/mavdevenvlinux.rst | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/mavproxy/source/docs/development/mavdevenvlinux.rst b/mavproxy/source/docs/development/mavdevenvlinux.rst index aef299389d..361833320b 100644 --- a/mavproxy/source/docs/development/mavdevenvlinux.rst +++ b/mavproxy/source/docs/development/mavdevenvlinux.rst @@ -13,7 +13,7 @@ The pip-installed MAVProxy will need to uninstalled (if already installed) to pr .. code:: bash - pip uninstall MAVProxy + python3 -m pip uninstall MAVProxy Use git to download the MAVProxy source: @@ -21,12 +21,38 @@ Use git to download the MAVProxy source: git clone https://github.com/ArduPilot/MAVProxy.git -After making the desired changes, MAVProxy is required to be installed -(any change to the modules won't work otherwise). This needs to happen after any -changes to the source code. This can be done by: -.. code:: bash - python3 -m pip install . +.. tabs:: + + .. group-tab:: User Python Environment + + After making the desired changes, MAVProxy is required to be installed + (any change to the modules won't work otherwise). This needs to happen after any + changes to the source code. This can be done by: + + .. code-block:: bash + + python -m pip install . + + + .. group-tab:: Virtual Python Environment + + Using a virtual environment allows quicker editing. + If you make code changes, just re-run MAVProxy. + We give access to system site packages because + compiling wx in a virtual environment is extremely difficult. + Instead, rely on the host OS to supply that. + + .. code-block:: bash + + python3 -m venv .venv --system-site-packages + source .venv/bin/activate + python -m pip install --editable . MAVProxy can then be run as per normal. + +.. code:: bash + + which mavproxy.py + mavproxy.py --help