From 627976e65acb8b24184e3e659ce04d4f5015123a Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Sun, 19 May 2024 14:54:43 +0200 Subject: [PATCH] DOC: add a brief explanation of build isolation to the tutorial Closes gh-630 --- docs/tutorials/introduction.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/tutorials/introduction.rst b/docs/tutorials/introduction.rst index 620e65252..bba4ac818 100644 --- a/docs/tutorials/introduction.rst +++ b/docs/tutorials/introduction.rst @@ -255,6 +255,18 @@ If the build succeeded, you'll have the binary artifacts in the ``dist`` folder. easier, we recommend checking out the cibuildwheel_ project, which allows you to automate it. +Build isolation +``````````````` + +Building with ``python -m build`` or with ``pip`` uses build isolation by +default. I.e., the build frontend creates a new, temporary virtual environment +with all build dependencies before calling ``meson-python`` to build a wheel. + +If you disable build isolation, you are responsible for ensuring that +``meson-python`` and all other build dependencies for the package are installed +already in the Python environment. Note that if you use a virtual environment +to build in, it must be activated. + Distributing the project ------------------------