Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion docs/how-to-guides/config-settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions docs/how-to-guides/limited-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
28 changes: 28 additions & 0 deletions docs/how-to-guides/meson-args.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------------------------------------
Expand Down Expand Up @@ -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
--------------------------------
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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" .