AlenkaF commented on code in PR #47334: URL: https://github.com/apache/arrow/pull/47334#discussion_r2313034910
########## docs/source/developers/python/building.rst: ########## @@ -0,0 +1,645 @@ +.. Licensed to the Apache Software Foundation (ASF) under one +.. or more contributor license agreements. See the NOTICE file +.. distributed with this work for additional information +.. regarding copyright ownership. The ASF licenses this file +.. to you under the Apache License, Version 2.0 (the +.. "License"); you may not use this file except in compliance +.. with the License. You may obtain a copy of the License at + +.. http://www.apache.org/licenses/LICENSE-2.0 + +.. Unless required by applicable law or agreed to in writing, +.. software distributed under the License is distributed on an +.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +.. KIND, either express or implied. See the License for the +.. specific language governing permissions and limitations +.. under the License. + +.. currentmodule:: pyarrow +.. highlight:: console +.. _build_pyarrow: + +================ +Building PyArrow +================ + + +This page provides source build instructions for PyArrow for all platforms. + +System Requirements +=================== + +.. tab-set:: + :sync-group: language + + .. tab-item:: Linux and macOS + :sync: linux-macos + + On macOS, any modern XCode or Xcode Command Line Tools (``xcode-select --install``) + are sufficient. + + On Linux, for this guide, we require a minimum of gcc or clang 9. + You can check your version by running + + .. code-block:: + + $ gcc --version + + If the system compiler is older than gcc 9, it can be set to a newer version + using the ``$CC`` and ``$CXX`` environment variables: + + .. code-block:: + + $ export CC=gcc-9 + $ export CXX=g++-9 + + + .. tab-item:: Windows + :sync: wins + + Building on Windows requires one of the following compilers to be + installed: + + - `Build Tools for Visual Studio 2022 <https://aka.ms/vs/17/release/vs_BuildTools.exe>`_ or + - Visual Studio 2022 + + During the setup of Build Tools, ensure at least one Windows SDK + is selected. + +Environment setup +================= + +First, start from a fresh clone of Apache Arrow: + +.. code-block:: + + $ git clone https://github.com/apache/arrow.git + +There are two supported ways to set up the build environment for PyArrow: using +**Conda** to manage the dependencies or using **pip** with manual dependency +management. + +Both methods are shown bellow for Linux and macOS. For Windows, only the +Conda-based setup is currently documented, skipping some of the +Linux/macOS-only packages. + +Note that in case you are not using conda on a Windows platform, Arrow C++ +libraries need to be bundled with ``pyarrow``. For extra information see the +Windows tab under the :ref:`pyarrow_build_section` section. + +.. tab-set:: + :sync-group: language + + .. tab-item:: Linux and macOS using conda + :sync: linux-macos + + Pull in the test data and setup the environment variables: + + .. code-block:: + + $ pushd arrow + $ git submodule update --init + $ export PARQUET_TEST_DATA="${PWD}/cpp/submodules/parquet-testing/data" + $ export ARROW_TEST_DATA="${PWD}/testing/data" + $ popd + + The `conda <https://conda.io/>`_ package manager allows installing build-time + dependencies for Arrow C++ and PyArrow as pre-built binaries, which can make + Arrow development easier and faster. + + Let's create a conda environment with all the C++ build and Python dependencies + from conda-forge, targeting development for Python 3.13: + + .. code-block:: + + $ conda create -y -n pyarrow-dev -c conda-forge \ + --file arrow/ci/conda_env_unix.txt \ + --file arrow/ci/conda_env_cpp.txt \ + --file arrow/ci/conda_env_python.txt \ + --file arrow/ci/conda_env_gandiva.txt \ + compilers \ + python=3.13 \ + pandas + + As of January 2019, the ``compilers`` package is needed on many Linux + distributions to use packages from conda-forge. Review Comment: Will look into it! I did update the System Requirements section for Linux/macOS and Windows. I tested the new Windows setup and should be good. As for the Linux/macOS min compiler version I haven't tested, only updated the versions as per the info I got online. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org