@@ -49,6 +49,56 @@ frontend, like ``builddir``, to specify the build directory to use/re-use. You
4949can find more information about them in the `build options page `_.
5050
5151
52+ Editable installs
53+ -----------------
54+
55+ Editable installs allow you to install the project in such a way where you can
56+ edit the project source and have those changes be reflected in the installed
57+ module, without having to explicitly rebuild and reinstall.
58+
59+ The way it works on ``meson-python `` specifically, is that when you import a
60+ module of the project, it will be rebuilt on the fly. This means that project
61+ imports will take more time than usual.
62+
63+ You can use pip to install the project in editable mode.
64+
65+
66+ .. code-block ::
67+
68+ python -m pip install -e .
69+
70+
71+ It might be helpful to see the output of the Meson _ commands. This is offered
72+ as a **provisional ** feature, meaning it is subject to change.
73+
74+ If you want to temporarily enable the output, you can set the
75+ ``MESONPY_EDITABLE_VERBOSE `` environment variable to a non-empty value. If this
76+ environment variable is present during import, the Meson _ commands and their
77+ output will be printed.
78+
79+
80+ .. code-block ::
81+
82+ MESONPY_EDITABLE_VERBOSE=1 python my_script.py
83+
84+
85+
86+ This behavior can also be enabled by default by passing the ``editable-verbose ``
87+ config setting when installing the project.
88+
89+
90+ .. code-block ::
91+
92+ python -m pip install -e . --config-settings editable-verbose=true
93+
94+
95+ This way, you won't need to always set ``MESONPY_EDITABLE_VERBOSE `` environment
96+ variable, the Meson _ commands and their output will always be printed.
97+
98+ The ``MESONPY_EDITABLE_VERBOSE `` won't have any effect during the project
99+ install step.
100+
101+
52102How does it work?
53103=================
54104
0 commit comments