File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,21 +190,23 @@ There are several ways to build and install the package from source:
190190 .. code-block :: console
191191
192192 $ cd python-package/
193- $ pip install -v . # Builds the shared object automatically.
193+ $ pip install -v .
194194
195- which will compile XGBoost's native (C++) code using default CMake flags. To enable
196- additional compilation options, pass them as CMake defines through
197- ``scikit-build-core ``'s ``--config-settings ``:
195+ which will invoke CMake underneath to build the shared library
196+ (``libxgboost.so `` on Linux). To customize the CMake options,
197+ add the command-line argument
198+ ``--config-settings cmake.define.[CMAKE_OPTION]=[OPTION_VALUE] ``.
199+ (Pip 22.1+ is required.)
200+
201+ For example:
198202
199203 .. code-block :: console
200204
201205 $ pip install -v . \
202206 --config-settings cmake.define.USE_CUDA=ON \
203207 --config-settings cmake.define.USE_NCCL=ON
204208
205- Use Pip 22.1 or later to use ``--config-settings `` option.
206-
207- Common CMake options the Python wheel forwards to the libxgboost build
209+ Common CMake options
208210 (see :ref: `building-the-shared-library ` for the full list):
209211
210212 - ``USE_CUDA `` — build with CUDA / GPU acceleration
@@ -257,7 +259,7 @@ There are several ways to build and install the package from source:
257259 libpath = pathlib.Path(sys.base_prefix).joinpath(" lib" , " libxgboost.so" )
258260 assert libpath.exists()
259261
260- Then pass ``XGBOOST_USE_SYSTEM_LIBXGBOOST=ON `` to ``pip install `` as a CMake define :
262+ Then pass ``cmake.define. XGBOOST_USE_SYSTEM_LIBXGBOOST=ON `` to ``pip install ``:
261263
262264 .. code-block :: bash
263265
You can’t perform that action at this time.
0 commit comments