-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-43845: [Docs] Update Python Development Build Instructions #43617
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -398,7 +398,7 @@ Now, build pyarrow: | |||||
$ pushd arrow/python | ||||||
$ export PYARROW_PARALLEL=4 | ||||||
$ python setup.py build_ext --inplace | ||||||
$ python -m pip install -e . | ||||||
$ popd | ||||||
If you did build one of the optional components in C++, the equivalent components | ||||||
|
@@ -414,8 +414,8 @@ to the ``arrow/python`` folder and run ``git clean -Xfd .``. | |||||
|
||||||
By default, PyArrow will be built in release mode even if Arrow C++ has been | ||||||
built in debug mode. To create a debug build of PyArrow, run | ||||||
``export PYARROW_BUILD_TYPE=debug`` prior to running ``python setup.py | ||||||
build_ext --inplace`` above. A ``relwithdebinfo`` build can be created | ||||||
``export PYARROW_BUILD_TYPE=debug`` prior to running ``python -m pip | ||||||
install -e .`` above. A ``relwithdebinfo`` build can be created | ||||||
similarly. | ||||||
|
||||||
Now you are ready to install test dependencies and run `Unit Testing`_, as | ||||||
|
@@ -427,12 +427,9 @@ libraries), one can set ``--bundle-arrow-cpp``: | |||||
.. code-block:: | ||||||
$ pip install wheel # if not installed | ||||||
$ python setup.py build_ext --build-type=$ARROW_BUILD_TYPE \ | ||||||
--bundle-arrow-cpp bdist_wheel | ||||||
.. note:: | ||||||
To install an editable PyArrow build run ``pip install -e . --no-build-isolation`` | ||||||
in the ``arrow/python`` directory. | ||||||
$ python -m pip wheel . \ | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Using https://build.pypa.io/en/stable/ might be the recommended way nowadays to build a wheel? When using that, it might need There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I believe the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we need some way to pass down the option, but what I meant is that when using Because in the docs of |
||||||
--global-option="--build-type=$ARROW_BUILD_TYPE" \ | ||||||
--global-option="--bundle-arrow-cpp" | ||||||
Docker examples | ||||||
~~~~~~~~~~~~~~~ | ||||||
|
@@ -548,7 +545,7 @@ Now, we can build pyarrow: | |||||
$ pushd arrow\python | ||||||
$ set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 | ||||||
$ python setup.py build_ext --inplace | ||||||
$ python pip install -e . | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(depending on what is done above) |
||||||
$ popd | ||||||
.. note:: | ||||||
|
@@ -588,7 +585,7 @@ Then run the unit tests with: | |||||
.. code-block:: | ||||||
$ set PYARROW_BUNDLE_ARROW_CPP=1 | ||||||
$ python setup.py build_ext --inplace | ||||||
$ python -m pip install -e . | ||||||
Note that bundled Arrow C++ libraries will not be automatically | ||||||
updated when rebuilding Arrow C++. | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those additional flags make it more similar to what we did before. It's probably debatable whether those should be added (disabling build isolation and installing deps), but since in this tutorial we have set up all build dependencies in advance, not doing that gives unnecessary pip overhead.
(this is also the command that I use locally, although for quick rebuilds I still use
python setup.py build_ext --inplace
)