You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2019/04/24 09:11:33 UTC

[arrow] branch master updated: ARROW-5165: [Python] update dev installation docs for --build-type + validate in setup.py

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new a419ec8  ARROW-5165: [Python] update dev installation docs for --build-type + validate in setup.py
a419ec8 is described below

commit a419ec828da03d0226d90a404508608ee7e9ae9a
Author: Joris Van den Bossche <jo...@gmail.com>
AuthorDate: Wed Apr 24 11:11:26 2019 +0200

    ARROW-5165: [Python] update dev installation docs for --build-type + validate in setup.py
    
    - Remove the mention of ``--build-type=$ARROW_BUILD_TYPE`` in the docs, since `ARROW_BUILD_TYPE` is not set, and 'release' is already the default.
    - Validate the value of `self.build_type` so that doing ``--build-type=$ARROW_BUILD_TYPE`` without having the env variable set gives a helpful error message instead of failing when bundling includes
    
    Author: Joris Van den Bossche <jo...@gmail.com>
    
    Closes #4192 from jorisvandenbossche/ARROW-5178-python-arrow-build-type and squashes the following commits:
    
    656fd8288 <Joris Van den Bossche> user .lower()
    d6e5ec3b2 <Joris Van den Bossche> ARROW-5178:  update dev installation docs for --build-type + validate in setup.py
---
 docs/source/developers/python.rst | 2 +-
 python/setup.py                   | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/source/developers/python.rst b/docs/source/developers/python.rst
index 0ebe8f1..3f2d0b0 100644
--- a/docs/source/developers/python.rst
+++ b/docs/source/developers/python.rst
@@ -285,7 +285,7 @@ Now, build pyarrow:
    export PYARROW_WITH_GANDIVA=1
    export PYARROW_WITH_ORC=1
    export PYARROW_WITH_PARQUET=1
-   python setup.py build_ext --build-type=$ARROW_BUILD_TYPE --inplace
+   python setup.py build_ext --inplace
    popd
 
 If you did not build one of the optional components, set the corresponding
diff --git a/python/setup.py b/python/setup.py
index 06c456e..907524a 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -171,6 +171,11 @@ class build_ext(_build_ext):
         'gandiva']
 
     def _run_cmake(self):
+        # check if build_type is correctly passed / set
+        if self.build_type.lower() not in ('release', 'debug'):
+            raise ValueError("--build-type (or PYARROW_BUILD_TYPE) needs to "
+                             "be 'release' or 'debug'")
+
         # The directory containing this setup.py
         source = osp.dirname(osp.abspath(__file__))