Skip to content

Commit 2a4e398

Browse files
dnicolodirgommers
authored andcommitted
DOC: assume pip 23.1 or later in examples
Add a note about the command line syntax for older versions.
1 parent 1674d9b commit 2a4e398

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

docs/how-to-guides/config-settings.rst

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ the ``-C`` short command line option:
3535
.. code-block:: console
3636
3737
$ python -m pip wheel . \
38-
--config-settings=setup-args="-Doption=disable" \
39-
--config-settings=compile-args="-j6"
38+
-Csetup-args="-Doption=true" \
39+
-Csetup-args="-Dvalue=1" \
40+
-Ccompile-args="-j6"
4041

4142

4243
Refer to the `build`_ and `pip`_ documentation for details. This
@@ -46,15 +47,16 @@ immediately install it, replace ``wheel`` with ``install``. See the
4647
:ref:`how-to-guides-meson-args` guide for more examples.
4748

4849

49-
.. admonition:: Passing multiple settings
50+
.. admonition:: Older pip versions
5051
:class: caution
5152

52-
Please note that ``pip`` prior to 23.1 did not offer a way to set a
53-
build config setting to a list of strings: later values for the
54-
same key passed to ``--config-settings`` override earlier ones,
55-
effectively limiting the number of options that can be passed to
56-
each command invoked in the build process to one. This limitation
57-
has been lifted in ``pip`` release 23.1.
53+
Please note that prior to version 23.1 ``pip`` did not support the ``-C``
54+
short command line switch for the ``--config-settings`` options and did not
55+
offer a way to set a build config setting to a list of strings: later
56+
values for the same key passed to ``--config-settings`` override earlier
57+
ones, effectively limiting the number of options that can be passed to each
58+
command invoked in the build process to one. This limitation has been
59+
lifted in ``pip`` release 23.1.
5860

5961

6062
.. _build: https://pypa-build.readthedocs.io/en/stable/

docs/how-to-guides/editable-installs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ set to a non-null value when installing the package:
178178

179179
.. code-block:: console
180180
181-
$ python -m pip install --no-build-isolation --config-settings=editable-verbose=true --editable .
181+
$ python -m pip install --no-build-isolation -Ceditable-verbose=true --editable .

docs/how-to-guides/meson-args.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ To set this option temporarily at build-time:
9090

9191
.. code-block:: console
9292
93-
$ python -m pip wheel --config-settings=setup-args="--default-library=static" .
93+
$ python -m pip wheel -Csetup-args="--default-library=static" .
9494
9595
9696
Select the build targets to include in the wheel
@@ -132,7 +132,7 @@ To set this option temporarily at build-time:
132132

133133
.. code-block:: console
134134
135-
$ python -m pip wheel --config-settings=install-args="--tags=runtime,python-runtime" .
135+
$ python -m pip wheel -Cinstall-args="--tags=runtime,python-runtime" .
136136
137137
138138
Set the build optimization level
@@ -165,7 +165,7 @@ To set this option temporarily at build-time:
165165

166166
.. code-block:: console
167167
168-
$ python -m pip wheel --config-settings=setup-args="-Doptimization=3" .
168+
$ python -m pip wheel -Csetup-args="-Doptimization=3" .
169169
170170
171171
.. _vsenv-example:
@@ -206,4 +206,4 @@ To set this option temporarily at build-time:
206206

207207
.. code-block:: console
208208
209-
$ python -m pip wheel --config-settings=setup-args="--vsenv" .
209+
$ python -m pip wheel -Csetup-args="--vsenv" .

0 commit comments

Comments
 (0)