From fb89732d6d498bf82b8be791134f041b1b181431 Mon Sep 17 00:00:00 2001 From: anjakefala Date: Tue, 27 Sep 2022 17:16:27 -0700 Subject: [PATCH 1/3] ARROW-17753: [Python] document cleaning for fixing build environment issues --- docs/source/developers/python.rst | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/source/developers/python.rst b/docs/source/developers/python.rst index c30efd2358f..b48f813b0c8 100644 --- a/docs/source/developers/python.rst +++ b/docs/source/developers/python.rst @@ -636,6 +636,52 @@ Caveats The Plasma component is not supported on Windows. +Deleting stale build artifacts +============================== + +When there have been changes to the structure of the Arrow C++ library or Pyarrow, +a thorough cleaning is recommended as a first attempt to fixing build errors. + +.. note:: + + It is not necessarily intuitive from the error itself that the problem is due to stale artifacts. + Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility". + +To delete stale Arrow C++ build artifacts: + +.. code-block:: + + $ rm -rf arrow/cpp/build + +To delete stale PyArrow build artifacts: + +.. code-block:: + + $ pushd python + $ python3 setup.py clean + $ popd + +To delete misc build artifacts that are hidden from ``git``: + +.. code-block:: + + $ git clean -Xfd . + +If using a Conda environment, there are some build artifacts that get installed in +``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``. +If still running into build errors, the files can be manually found and erased by hand, +but one approach is to set-up a new Conda environment. + +You can either delete the current one, and start fresh: + +.. code-block:: + + $ conda deactivate + $ conda remove -n pyarrow-dev + +Or, less destructively, create a different environment with a different name. + + Installing Nightly Packages =========================== From d325af8a1f13bce332fe3e9861416a1dbd7a9125 Mon Sep 17 00:00:00 2001 From: anjakefala Date: Wed, 28 Sep 2022 14:21:56 -0700 Subject: [PATCH 2/3] fixup: remove deprecated setup.py clean, and clarify that conda env files can be manually removed --- docs/source/developers/python.rst | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/source/developers/python.rst b/docs/source/developers/python.rst index b48f813b0c8..79cc1d3219f 100644 --- a/docs/source/developers/python.rst +++ b/docs/source/developers/python.rst @@ -645,34 +645,28 @@ a thorough cleaning is recommended as a first attempt to fixing build errors. .. note:: It is not necessarily intuitive from the error itself that the problem is due to stale artifacts. - Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility". + Example of a build error from stale artifacts is "Unknown CMake command "arrow_keep_backward_compatibility"". To delete stale Arrow C++ build artifacts: .. code-block:: - $ rm -rf arrow/cpp/build + $ rm -rf arrow/cpp/build -To delete stale PyArrow build artifacts: +To delete stale Pyarrow build artifacts: .. code-block:: - $ pushd python - $ python3 setup.py clean - $ popd - -To delete misc build artifacts that are hidden from ``git``: - -.. code-block:: - - $ git clean -Xfd . + $ git clean -Xfd . If using a Conda environment, there are some build artifacts that get installed in -``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``. -If still running into build errors, the files can be manually found and erased by hand, -but one approach is to set-up a new Conda environment. +``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``, +``$ARROW_HOME/include/arrow``, ``$ARROW_HOME/lib/libarrow*``, etc. + +These files can be manually deleted. If unsure which files to erase, one approach +is to recreate the Conda environment. -You can either delete the current one, and start fresh: +Either delete the current one, and start fresh: .. code-block:: From 5ae3a84b500d6f139afe9b28fa6d820720560fae Mon Sep 17 00:00:00 2001 From: anjakefala Date: Thu, 29 Sep 2022 10:52:39 -0700 Subject: [PATCH 3/3] fixup: narrow git clean to python subfolder. fix capitalisation of PyArrow --- docs/source/developers/python.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/developers/python.rst b/docs/source/developers/python.rst index 79cc1d3219f..a3a987f640c 100644 --- a/docs/source/developers/python.rst +++ b/docs/source/developers/python.rst @@ -639,7 +639,7 @@ The Plasma component is not supported on Windows. Deleting stale build artifacts ============================== -When there have been changes to the structure of the Arrow C++ library or Pyarrow, +When there have been changes to the structure of the Arrow C++ library or PyArrow, a thorough cleaning is recommended as a first attempt to fixing build errors. .. note:: @@ -653,11 +653,11 @@ To delete stale Arrow C++ build artifacts: $ rm -rf arrow/cpp/build -To delete stale Pyarrow build artifacts: +To delete stale PyArrow build artifacts: .. code-block:: - $ git clean -Xfd . + $ git clean -Xfd python If using a Conda environment, there are some build artifacts that get installed in ``$ARROW_HOME`` (aka ``$CONDA_PREFIX``). For example, ``$ARROW_HOME/lib/cmake/Arrow*``,