Skip to content

Commit 7bd6ca2

Browse files
authored
Use shorthand notation for pip config-settings (#59583)
1 parent 47af7cb commit 7bd6ca2

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
if pip show pandas 1>/dev/null; then
3333
pip uninstall -y pandas
3434
fi
35-
python -m pip install --no-build-isolation -ve . --config-settings=setup-args="--werror"
35+
python -m pip install --no-build-isolation -ve . -Csetup-args="--werror"
3636
PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH
3737
sudo apt-get update && sudo apt-get install -y libegl1 libopengl0
3838
ci/run_tests.sh
@@ -57,7 +57,7 @@ jobs:
5757
. ~/virtualenvs/pandas-dev/bin/activate
5858
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
5959
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
60-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
60+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
6161
python -m pip list --no-cache-dir
6262
export PANDAS_CI=1
6363
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml

.github/actions/build_pandas/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ runs:
3333
run: |
3434
if [[ ${{ inputs.editable }} == "true" ]]; then
3535
pip install -e . --no-build-isolation -v --no-deps \
36-
--config-settings=setup-args="--werror"
36+
-Csetup-args="--werror"
3737
else
3838
pip install . --no-build-isolation -v --no-deps \
39-
--config-settings=setup-args="--werror"
39+
-Csetup-args="--werror"
4040
fi
4141
shell: bash -el {0}

.github/workflows/unit-tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ jobs:
235235
/opt/python/cp311-cp311/bin/python -m venv ~/virtualenvs/pandas-dev
236236
. ~/virtualenvs/pandas-dev/bin/activate
237237
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
238-
python -m pip install numpy --config-settings=setup-args="-Dallow-noblas=true"
238+
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
239239
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
240-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
240+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
241241
python -m pip list --no-cache-dir
242242
export PANDAS_CI=1
243243
python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
@@ -275,7 +275,7 @@ jobs:
275275
. ~/virtualenvs/pandas-dev/bin/activate
276276
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
277277
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
278-
python -m pip install --no-cache-dir --no-build-isolation -e . --config-settings=setup-args="--werror"
278+
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
279279
python -m pip list --no-cache-dir
280280
281281
- name: Run Tests
@@ -349,7 +349,7 @@ jobs:
349349
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
350350
python -m pip install versioneer[toml]
351351
python -m pip install python-dateutil tzdata cython hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
352-
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
352+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
353353
python -m pip list
354354
355355
- name: Run Tests
@@ -392,7 +392,7 @@ jobs:
392392
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy cython
393393
python -m pip install versioneer[toml]
394394
python -m pip install python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
395-
python -m pip install -ve . --no-build-isolation --no-index --no-deps --config-settings=setup-args="--werror"
395+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
396396
python -m pip list
397397
398398
- name: Run Tests

.gitpod.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ tasks:
1313
mkdir -p .vscode
1414
cp gitpod/settings.json .vscode/settings.json
1515
git fetch --tags
16-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
16+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
1717
pre-commit install --install-hooks
1818
command: |
19-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
19+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
2020
echo "✨ Pre-build complete! You can close this terminal ✨ "
2121
2222
# --------------------------------------------------------

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ or for installing in [development mode](https://pip.pypa.io/en/latest/cli/pip_in
138138

139139

140140
```sh
141-
python -m pip install -ve . --no-build-isolation --config-settings=editable-verbose=true
141+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
142142
```
143143

144144
See the full instructions for [installing from source](https://pandas.pydata.org/docs/dev/development/contributing_environment.html).

doc/source/development/contributing_environment.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ To compile pandas with meson, run::
227227
# By default, this will print verbose output
228228
# showing the "rebuild" taking place on import (see section below for explanation)
229229
# If you do not want to see this, omit everything after --no-build-isolation
230-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
230+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
231231

232232
.. note::
233233
The version number is pulled from the latest repository tag. Be sure to fetch the latest tags from upstream
@@ -242,15 +242,15 @@ To compile pandas with meson, run::
242242
It is possible to pass options from the pip frontend to the meson backend if you would like to configure your
243243
install. Occasionally, you'll want to use this to adjust the build directory, and/or toggle debug/optimization levels.
244244

245-
You can pass a build directory to pandas by appending ``--config-settings builddir="your builddir here"`` to your pip command.
245+
You can pass a build directory to pandas by appending ``-Cbuilddir="your builddir here"`` to your pip command.
246246
This option allows you to configure where meson stores your built C extensions, and allows for fast rebuilds.
247247

248248
Sometimes, it might be useful to compile pandas with debugging symbols, when debugging C extensions.
249-
Appending ``--config-settings setup-args="-Ddebug=true"`` will do the trick.
249+
Appending ``-Csetup-args="-Ddebug=true"`` will do the trick.
250250

251251
With pip, it is possible to chain together multiple config settings (for example specifying both a build directory
252252
and building with debug symbols would look like
253-
``--config-settings builddir="your builddir here" --config-settings=setup-args="-Dbuildtype=debug"``.
253+
``-Cbuilddir="your builddir here" -Csetup-args="-Dbuildtype=debug"``.
254254

255255
**Compiling pandas with setup.py**
256256

@@ -302,7 +302,7 @@ output when importing pandas, you can set the environment variable ``MESONPY_EDI
302302

303303
If you would like to see this verbose output every time, you can set the ``editable-verbose`` config setting to ``true`` like so::
304304

305-
python -m pip install -ve . --config-settings editable-verbose=true
305+
python -m pip install -ve . -Ceditable-verbose=true
306306

307307
.. tip::
308308
If you ever find yourself wondering whether setuptools or meson was used to build your pandas,

doc/source/development/debugging_extensions.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Debugging locally
1919

2020
By default building pandas from source will generate a release build. To generate a development build you can type::
2121

22-
pip install -ve . --no-build-isolation --config-settings=builddir="debug" --config-settings=setup-args="-Dbuildtype=debug"
22+
pip install -ve . --no-build-isolation -Cbuilddir="debug" -Csetup-args="-Dbuildtype=debug"
2323

2424
.. note::
2525

@@ -42,7 +42,7 @@ Inside the image, you can use meson to build/install pandas and place the build
4242

4343
.. code-block:: sh
4444
45-
python -m pip install -ve . --no-build-isolation --config-settings=builddir="debug" --config-settings=setup-args="-Dbuildtype=debug"
45+
python -m pip install -ve . --no-build-isolation -Cbuilddir="debug" -Csetup-args="-Dbuildtype=debug"
4646
4747
If planning to use cygdb, the files required by that application are placed within the build folder. So you have to first ``cd`` to the build folder, then start that application.
4848

doc/source/development/maintaining.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ and then run::
157157
git bisect start
158158
git bisect good v1.4.0
159159
git bisect bad v1.5.0
160-
git bisect run bash -c "python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true; python t.py"
160+
git bisect run bash -c "python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true; python t.py"
161161

162162
This finds the first commit that changed the behavior. The C extensions have to be
163163
rebuilt at every step, so the search can take a while.
164164

165165
Exit bisect and rebuild the current version::
166166

167167
git bisect reset
168-
python -m pip install -ve . --no-build-isolation --config-settings editable-verbose=true
168+
python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true
169169

170170
Report your findings under the corresponding issue and ping the commit author to get
171171
their input.

pandas/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
raise ImportError(
2929
f"C extension: {_module} not built. If you want to import "
3030
"pandas from the source directory, you may need to run "
31-
"'python -m pip install -ve . --no-build-isolation --config-settings "
32-
"editable-verbose=true' to build the C extensions first."
31+
"'python -m pip install -ve . --no-build-isolation -Ceditable-verbose=true' "
32+
"to build the C extensions first."
3333
) from _err
3434

3535
from pandas._config import (

0 commit comments

Comments
 (0)