diff --git a/docs/how-to-guides/config-settings.rst b/docs/how-to-guides/config-settings.rst index 8137002a3..b84ab1eb7 100644 --- a/docs/how-to-guides/config-settings.rst +++ b/docs/how-to-guides/config-settings.rst @@ -39,7 +39,17 @@ the ``-C`` short command line option: -Csetup-args="-Dvalue=1" \ -Ccompile-args="-j6" -Refer to the `build`_ and `pip`_ documentation for details. This + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel \ + -Csetup-args="-Doption=true" \ + -Csetup-args="-Dvalue=1" \ + -Ccompile-args="-j6" + +Refer to the `build`_, `pip`_, and `uv`_ documentation for details. This example uses the ``python -m pip wheel`` command to build a Python wheel that can be later installed or distributed. To build a package and immediately install it, replace ``wheel`` with ``install``. See the @@ -60,6 +70,7 @@ immediately install it, replace ``wheel`` with ``install``. See the .. _build: https://pypa-build.readthedocs.io/en/stable/ .. _pip: https://pip.pypa.io/ +.. _uv: https://docs.astral.sh/uv/ Using a persistent build directory @@ -88,6 +99,13 @@ For example: $ python -m pip install . -Cbuild-dir=build + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel -Cbuild-dir=build + After running this command, the ``build`` directory will contain all the build artifacts and support files created by ``meson``, ``ninja`` and ``meson-python``. The same build directory can be used by diff --git a/docs/how-to-guides/limited-api.rst b/docs/how-to-guides/limited-api.rst index a8323d299..8dedb2465 100644 --- a/docs/how-to-guides/limited-api.rst +++ b/docs/how-to-guides/limited-api.rst @@ -101,6 +101,13 @@ To build a stable ABI wheel, explicitly enable limited API builds: $ python -m pip wheel -Csetup-args="-Dpython.allow_limited_api=true" . + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel -Csetup-args="-Dpython.allow_limited_api=true" . + .. _limited-api-wheel-tags: diff --git a/docs/how-to-guides/meson-args.rst b/docs/how-to-guides/meson-args.rst index e543e5a6b..96eda4ae0 100644 --- a/docs/how-to-guides/meson-args.rst +++ b/docs/how-to-guides/meson-args.rst @@ -92,6 +92,13 @@ To set this option temporarily at build-time: $ python -m pip wheel -Csetup-args="--default-library=static" . + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel -Csetup-args="--default-library=static" . + Select the build targets to include in the wheel ------------------------------------------------ @@ -134,6 +141,13 @@ To set this option temporarily at build-time: $ python -m pip wheel -Cinstall-args="--tags=runtime,python-runtime" . + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel -Cinstall-args="--tags=runtime,python-runtime" . + Set the build optimization level -------------------------------- @@ -167,6 +181,13 @@ To set this option temporarily at build-time: $ python -m pip wheel -Csetup-args="-Doptimization=3" . + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel -Csetup-args="-Doptimization=3" . + .. _vsenv-example: @@ -215,3 +236,10 @@ To set this option temporarily at build-time: .. code-block:: console $ python -m pip wheel -Csetup-args="--vsenv" . + + .. tab-item:: uv + :sync: key_uv + + .. code-block:: console + + $ uv build --wheel -Csetup-args="--vsenv" .