You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2017/05/12 20:18:10 UTC

arrow git commit: ARROW-1016: Python: Include C++ headers (optionally) in wheels

Repository: arrow
Updated Branches:
  refs/heads/master 05e8f6894 -> 95ee96b92


ARROW-1016: Python: Include C++ headers (optionally) in wheels

Author: Uwe L. Korn <uw...@xhochy.com>

Closes #678 from xhochy/ARROW-1016 and squashes the following commits:

bc9b5ee [Uwe L. Korn] Build pyarrow using multiple cores
c982c97 [Uwe L. Korn] Remove existing include folder
0b3209a [Uwe L. Korn] More cmake debug output
590f629 [Uwe L. Korn] Add output to wrap cmake command
3de6a8a [Uwe L. Korn] ARROW-1016: Python: Include C++ headers (optionally) in wheels


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/95ee96b9
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/95ee96b9
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/95ee96b9

Branch: refs/heads/master
Commit: 95ee96b922496120a96a7bad3d681bb3e94689bf
Parents: 05e8f68
Author: Uwe L. Korn <uw...@xhochy.com>
Authored: Fri May 12 16:18:03 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Fri May 12 16:18:03 2017 -0400

----------------------------------------------------------------------
 ci/travis_script_manylinux.sh |  2 +-
 python/CMakeLists.txt         |  1 +
 python/manylinux1/README.md   |  2 +-
 python/setup.py               | 12 ++++++++++++
 4 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/95ee96b9/ci/travis_script_manylinux.sh
----------------------------------------------------------------------
diff --git a/ci/travis_script_manylinux.sh b/ci/travis_script_manylinux.sh
index 69feb68..4e6be62 100755
--- a/ci/travis_script_manylinux.sh
+++ b/ci/travis_script_manylinux.sh
@@ -18,4 +18,4 @@ set -ex
 pushd python/manylinux1
 git clone ../../ arrow
 docker build -t arrow-base-x86_64 -f Dockerfile-x86_64 .
-docker run --rm -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh
+docker run --rm -e PYARROW_PARALLEL=3 -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh

http://git-wip-us.apache.org/repos/asf/arrow/blob/95ee96b9/python/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index a9db4d8..d828710 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -246,6 +246,7 @@ endfunction(bundle_arrow_lib)
 
 if (PYARROW_BUNDLE_ARROW_CPP)
   # arrow
+  file(COPY ${ARROW_INCLUDE_DIR}/arrow DESTINATION ${BUILD_OUTPUT_ROOT_DIRECTORY}/include)
   bundle_arrow_lib(ARROW_SHARED_LIB)
   bundle_arrow_lib(ARROW_PYTHON_SHARED_LIB)
 endif()

http://git-wip-us.apache.org/repos/asf/arrow/blob/95ee96b9/python/manylinux1/README.md
----------------------------------------------------------------------
diff --git a/python/manylinux1/README.md b/python/manylinux1/README.md
index 32af6f3..2e7f56b 100644
--- a/python/manylinux1/README.md
+++ b/python/manylinux1/README.md
@@ -32,7 +32,7 @@ git clone ../../ arrow
 # Build the native baseimage
 docker build -t arrow-base-x86_64 -f Dockerfile-x86_64 .
 # Build the python packages
-docker run --rm -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh
+docker run --rm -t -i -v $PWD:/io arrow-base-x86_64 /io/build_arrow.sh
 # Now the new packages are located in the dist/ folder
 ls -l dist/
 ```

http://git-wip-us.apache.org/repos/asf/arrow/blob/95ee96b9/python/setup.py
----------------------------------------------------------------------
diff --git a/python/setup.py b/python/setup.py
index 1c46617..148224a 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -161,14 +161,18 @@ class build_ext(_build_ext):
             cmake_command = (['cmake', self.extra_cmake_args] +
                              cmake_options + [source])
 
+            print("-- Runnning cmake for pyarrow")
             self.spawn(cmake_command)
+            print("-- Finished cmake for pyarrow")
             args = ['make']
             if os.environ.get('PYARROW_BUILD_VERBOSE', '0') == '1':
                 args.append('VERBOSE=1')
 
             if 'PYARROW_PARALLEL' in os.environ:
                 args.append('-j{0}'.format(os.environ['PYARROW_PARALLEL']))
+            print("-- Running cmake --build for pyarrow")
             self.spawn(args)
+            print("-- Finished cmake --build for pyarrow")
         else:
             import shlex
             cmake_generator = 'Visual Studio 14 2015 Win64'
@@ -183,9 +187,13 @@ class build_ext(_build_ext):
             if "-G" in self.extra_cmake_args:
                 cmake_command = cmake_command[:-2]
 
+            print("-- Runnning cmake for pyarrow")
             self.spawn(cmake_command)
+            print("-- Finished cmake for pyarrow")
             # Do the build
+            print("-- Running cmake --build for pyarrow")
             self.spawn(['cmake', '--build', '.', '--config', self.build_type])
+            print("-- Finished cmake --build for pyarrow")
 
         if self.inplace:
             # a bit hacky
@@ -225,6 +233,10 @@ class build_ext(_build_ext):
                     os.symlink(lib_filename, link_name)
 
         if self.bundle_arrow_cpp:
+            print(pjoin(self.build_type, 'include'), pjoin(build_lib, 'pyarrow'))
+            if os.path.exists(pjoin(build_lib, 'pyarrow', 'include')):
+                shutil.rmtree(pjoin(build_lib, 'pyarrow', 'include'))
+            shutil.move(pjoin(self.build_type, 'include'), pjoin(build_lib, 'pyarrow'))
             move_lib("arrow")
             move_lib("arrow_python")
             if self.with_jemalloc: