This is an automated email from the ASF dual-hosted git repository.
jorisvandenbossche pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 2dbc5e26dc MINOR: [Python][Docs] Use CMake presets to simplify Python
build installation (#41500)
2dbc5e26dc is described below
commit 2dbc5e26dcbc6826b4eb7a330fa8090836f6b727
Author: William Ayd <[email protected]>
AuthorDate: Fri May 17 04:24:56 2024 -0400
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 <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
---
docs/source/developers/python.rst | 29 ++++++++++++++++++++---------
docs/source/python/data.rst | 2 +-
2 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/docs/source/developers/python.rst
b/docs/source/developers/python.rst
index be9fac067c..e84cd25201 100644
--- a/docs/source/developers/python.rst
+++ b/docs/source/developers/python.rst
@@ -302,10 +302,24 @@ created above (stored in ``$ARROW_HOME``):
.. code-block::
- $ mkdir arrow/cpp/build
- $ pushd arrow/cpp/build
- $ cmake -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
- -DCMAKE_INSTALL_LIBDIR=lib \
+ $ cmake -S arrow/cpp -B arrow/cpp/build \
+ -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
+ --preset ninja-release-python
+ $ cmake --build arrow/cpp/build --target install
+
+``ninja-release-python`` is not the only preset available - if you would like a
+build with more features like CUDA, Flight and Gandiva support you may opt for
+the ``ninja-release-python-maximal`` preset. If you wanted less features, (i.e.
+removing ORC and dataset support) you could opt for
+``ninja-release-python-minimal``. Changing the word ``release`` to ``debug``
+with any of the aforementioned presets will generate a debug build of Arrow.
+
+The presets are provided as a convenience, but you may instead opt to
+specify the individual components:
+
+.. code-block::
+ $ cmake -S arrow/cpp -B arrow/cpp/build \
+ -DCMAKE_INSTALL_PREFIX=$ARROW_HOME \
-DCMAKE_BUILD_TYPE=Debug \
-DARROW_BUILD_TESTS=ON \
-DARROW_COMPUTE=ON \
@@ -321,11 +335,8 @@ created above (stored in ``$ARROW_HOME``):
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_ZLIB=ON \
-DARROW_WITH_ZSTD=ON \
- -DPARQUET_REQUIRE_ENCRYPTION=ON \
- ..
- $ make -j4
- $ make install
- $ popd
+ -DPARQUET_REQUIRE_ENCRYPTION=ON
+ $ cmake --build arrow/cpp/build --target install -j4
There are a number of optional components that can be switched ON by
adding flags with ``ON``:
diff --git a/docs/source/python/data.rst b/docs/source/python/data.rst
index f17475138c..598c8c125f 100644
--- a/docs/source/python/data.rst
+++ b/docs/source/python/data.rst
@@ -561,7 +561,7 @@ schema without having to get any of the batches.::
It can also be sent between languages using the :ref:`C stream interface
<c-stream-interface>`.
-Conversion of RecordBatch do Tensor
+Conversion of RecordBatch to Tensor
-----------------------------------
Each array of the ``RecordBatch`` has it's own contiguous memory that is not
necessarily