Skip to content

Commit 2dbc5e2

Browse files
authored
MINOR: [Python][Docs] Use CMake presets to simplify Python build installation (#41500)
### Rationale for this change This should simplify the number of steps users have to go through to get a working Python installation from source Authored-by: Will Ayd <william.ayd@icloud.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
1 parent 6a9e2d5 commit 2dbc5e2

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

docs/source/developers/python.rst

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,24 @@ created above (stored in ``$ARROW_HOME``):
302302

303303
.. code-block::
304304
305-
$ mkdir arrow/cpp/build
306-
$ pushd arrow/cpp/build
307-
$ cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
308-
-DCMAKE_INSTALL_LIBDIR=lib \
305+
$ cmake -S arrow/cpp -B arrow/cpp/build \
306+
-DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
307+
--preset ninja-release-python
308+
$ cmake --build arrow/cpp/build --target install
309+
310+
``ninja-release-python`` is not the only preset available - if you would like a
311+
build with more features like CUDA, Flight and Gandiva support you may opt for
312+
the ``ninja-release-python-maximal`` preset. If you wanted less features, (i.e.
313+
removing ORC and dataset support) you could opt for
314+
``ninja-release-python-minimal``. Changing the word ``release`` to ``debug``
315+
with any of the aforementioned presets will generate a debug build of Arrow.
316+
317+
The presets are provided as a convenience, but you may instead opt to
318+
specify the individual components:
319+
320+
.. code-block::
321+
$ cmake -S arrow/cpp -B arrow/cpp/build \
322+
-DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
309323
-DCMAKE_BUILD_TYPE=Debug \
310324
-DARROW_BUILD_TESTS=ON \
311325
-DARROW_COMPUTE=ON \
@@ -321,11 +335,8 @@ created above (stored in ``$ARROW_HOME``):
321335
-DARROW_WITH_SNAPPY=ON \
322336
-DARROW_WITH_ZLIB=ON \
323337
-DARROW_WITH_ZSTD=ON \
324-
-DPARQUET_REQUIRE_ENCRYPTION=ON \
325-
..
326-
$ make -j4
327-
$ make install
328-
$ popd
338+
-DPARQUET_REQUIRE_ENCRYPTION=ON
339+
$ cmake --build arrow/cpp/build --target install -j4
329340
330341
There are a number of optional components that can be switched ON by
331342
adding flags with ``ON``:

docs/source/python/data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ schema without having to get any of the batches.::
561561

562562
It can also be sent between languages using the :ref:`C stream interface <c-stream-interface>`.
563563

564-
Conversion of RecordBatch do Tensor
564+
Conversion of RecordBatch to Tensor
565565
-----------------------------------
566566

567567
Each array of the ``RecordBatch`` has it's own contiguous memory that is not necessarily

0 commit comments

Comments
 (0)