Skip to content

Commit

Permalink
ARROW-9532: [Python][Doc] Use Python3_EXECUTABLE instead of PYTHON_EX…
Browse files Browse the repository at this point in the history
…ECUTABLE for finding Python executable

Closes #8002 from arw2019/improve-python-build-docs

Authored-by: arw2019 <andrew.r.wieteska@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
arw2019 authored and kou committed Aug 20, 2020
1 parent 25b0b1b commit c90ad63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/source/developers/python.rst
Expand Up @@ -148,7 +148,7 @@ Pull in the test data and setup the environment variables:
git submodule update
export PARQUET_TEST_DATA="${PWD}/cpp/submodules/parquet-testing/data"
export ARROW_TEST_DATA="${PWD}/testing/data"
popd
Using Conda
~~~~~~~~~~~
Expand Down Expand Up @@ -305,7 +305,7 @@ libraries are needed for Parquet support.
If multiple versions of Python are installed in your environment, you may have
to pass additional parameters to cmake so that it can find the right
executable, headers and libraries. For example, specifying
``-DPYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python`` (assuming that you're in
``-DPython3_EXECUTABLE=$VIRTUAL_ENV/bin/python`` (assuming that you're in
virtualenv) enables cmake to choose the python executable which you are using.

.. note::
Expand All @@ -323,6 +323,12 @@ virtualenv) enables cmake to choose the python executable which you are using.
:ref:`here <cpp-build-dependency-management>`)
to explicitly tell CMake not to use conda.

.. note::

With older versions of ``cmake`` (<3.15) you might need to pass ``-DPYTHON_EXECUTABLE``
instead of ``-DPython3_EXECUTABLE``. See `cmake documentation <https://cmake.org/cmake/help/latest/module/FindPython3.html#artifacts-specification>`
for more details.

For any other C++ build challenges, see :ref:`cpp-development`.

Now, build pyarrow:
Expand Down
1 change: 1 addition & 0 deletions python/setup.py
Expand Up @@ -225,6 +225,7 @@ def _run_cmake(self):

cmake_options = [
'-DPYTHON_EXECUTABLE=%s' % sys.executable,
'-DPython3_EXECUTABLE=%s' % sys.executable,
static_lib_option,
]

Expand Down

0 comments on commit c90ad63

Please sign in to comment.