arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-922: Allow Flatbuffers and RapidJSON to be used locally on Windows
Date Mon, 01 May 2017 03:01:18 GMT
Repository: arrow
Updated Branches:
  refs/heads/master d4a2a75a5 -> 6950e45db


ARROW-922: Allow Flatbuffers and RapidJSON to be used locally on Windows

Author: Phillip Cloud <cpcloud@gmail.com>

Closes #621 from cpcloud/ARROW-922 and squashes the following commits:

0da7a56 [Phillip Cloud] Add parallel builds
8b377da [Phillip Cloud] ARROW-922: Allow Flatbuffers and RapidJSON to be used locally on Windows


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

Branch: refs/heads/master
Commit: 6950e45db78934924a41c39b79bb2c99996d4d56
Parents: d4a2a75
Author: Phillip Cloud <cpcloud@gmail.com>
Authored: Sun Apr 30 23:01:12 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Sun Apr 30 23:01:12 2017 -0400

----------------------------------------------------------------------
 ci/msvc-build.bat                       | 33 +++++++++++++---------------
 cpp/cmake_modules/FindFlatbuffers.cmake | 16 +++++++-------
 2 files changed, 23 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/6950e45d/ci/msvc-build.bat
----------------------------------------------------------------------
diff --git a/ci/msvc-build.bat b/ci/msvc-build.bat
index aca1f8c..504da76 100644
--- a/ci/msvc-build.bat
+++ b/ci/msvc-build.bat
@@ -17,40 +17,37 @@
 
 @echo on
 
-set CONDA_ENV=C:\arrow-conda-env
-set ARROW_HOME=C:\arrow-install
-
-conda create -p %CONDA_ENV% -q -y python=%PYTHON% ^
+conda create -n arrow -q -y python=%PYTHON% ^
       six pytest setuptools numpy pandas cython
-call activate %CONDA_ENV%
+conda install -n arrow -q -y -c conda-forge flatbuffers rapidjson
+call activate arrow
+
+set ARROW_HOME=%CONDA_PREFIX%\Library
+set FLATBUFFERS_HOME=%CONDA_PREFIX%\Library
+set RAPIDJSON_HOME=%CONDA_PREFIX%\Library
 
 @rem Build and test Arrow C++ libraries
 
-cd cpp
-mkdir build
-cd build
+mkdir cpp\build
+cd cpp\build
+
 cmake -G "%GENERATOR%" ^
-      -DCMAKE_INSTALL_PREFIX=%ARROW_HOME% ^
+      -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
       -DARROW_BOOST_USE_SHARED=OFF ^
       -DCMAKE_BUILD_TYPE=Release ^
-      -DARROW_CXXFLAGS="/WX" ^
-      -DARROW_PYTHON=on ^
+      -DARROW_CXXFLAGS="/WX /MP" ^
+      -DARROW_PYTHON=ON ^
       ..  || exit /B
 cmake --build . --target INSTALL --config Release  || exit /B
 
 @rem Needed so python-test.exe works
-set PYTHONPATH=%CONDA_ENV%\Lib;%CONDA_ENV%\Lib\site-packages;%CONDA_ENV%\python35.zip;%CONDA_ENV%\DLLs;%CONDA_ENV%
+set PYTHONPATH=%CONDA_PREFIX%\Lib;%CONDA_PREFIX%\Lib\site-packages;%CONDA_PREFIX%\python35.zip;%CONDA_PREFIX%\DLLs;%CONDA_PREFIX%
 
 ctest -VV  || exit /B
 
-set PYTHONPATH=
-
 @rem Build and import pyarrow
-
-set PATH=%ARROW_HOME%\bin;%PATH%
+set PYTHONPATH=
 
 cd ..\..\python
 python setup.py build_ext --inplace  || exit /B
-python -c "import pyarrow"  || exit /B
-
 py.test pyarrow -v -s || exit /B

http://git-wip-us.apache.org/repos/asf/arrow/blob/6950e45d/cpp/cmake_modules/FindFlatbuffers.cmake
----------------------------------------------------------------------
diff --git a/cpp/cmake_modules/FindFlatbuffers.cmake b/cpp/cmake_modules/FindFlatbuffers.cmake
index 7fa640a..804f479 100644
--- a/cpp/cmake_modules/FindFlatbuffers.cmake
+++ b/cpp/cmake_modules/FindFlatbuffers.cmake
@@ -33,18 +33,18 @@
 
 if( NOT "${FLATBUFFERS_HOME}" STREQUAL "")
     file( TO_CMAKE_PATH "${FLATBUFFERS_HOME}" _native_path )
-    list( APPEND _flatbuffers_roots ${_native_path} )
+    list( APPEND _flatbuffers_roots "${_native_path}" )
 elseif ( Flatbuffers_HOME )
-    list( APPEND _flatbuffers_roots ${Flatbuffers_HOME} )
+    list( APPEND _flatbuffers_roots "${Flatbuffers_HOME}" )
 endif()
 
 # Try the parameterized roots, if they exist
 if ( _flatbuffers_roots )
     find_path( FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h
-        PATHS ${_flatbuffers_roots} NO_DEFAULT_PATH
+        PATHS "${_flatbuffers_roots}" NO_DEFAULT_PATH
         PATH_SUFFIXES "include" )
     find_library( FLATBUFFERS_LIBRARIES NAMES flatbuffers
-        PATHS ${_flatbuffers_roots} NO_DEFAULT_PATH
+        PATHS "${_flatbuffers_roots}" NO_DEFAULT_PATH
         PATH_SUFFIXES "lib" )
 else ()
     find_path( FLATBUFFERS_INCLUDE_DIR NAMES flatbuffers/flatbuffers.h )
@@ -52,7 +52,7 @@ else ()
 endif ()
 
 find_program(FLATBUFFERS_COMPILER flatc
-  ${FLATBUFFERS_HOME}/bin
+  "${FLATBUFFERS_HOME}/bin"
   /usr/local/bin
   /usr/bin
   NO_DEFAULT_PATH
@@ -60,9 +60,9 @@ find_program(FLATBUFFERS_COMPILER flatc
 
 if (FLATBUFFERS_INCLUDE_DIR AND FLATBUFFERS_LIBRARIES)
   set(FLATBUFFERS_FOUND TRUE)
-  get_filename_component( FLATBUFFERS_LIBS ${FLATBUFFERS_LIBRARIES} PATH )
+  get_filename_component( FLATBUFFERS_LIBS "${FLATBUFFERS_LIBRARIES}" PATH )
   set(FLATBUFFERS_LIB_NAME libflatbuffers)
-  set(FLATBUFFERS_STATIC_LIB ${FLATBUFFERS_LIBS}/${FLATBUFFERS_LIB_NAME}.a)
+  set(FLATBUFFERS_STATIC_LIB "${FLATBUFFERS_LIBS}/${FLATBUFFERS_LIB_NAME}.a")
 else ()
   set(FLATBUFFERS_FOUND FALSE)
 endif ()
@@ -75,7 +75,7 @@ else ()
   if (NOT Flatbuffers_FIND_QUIETLY)
     set(FLATBUFFERS_ERR_MSG "Could not find the Flatbuffers library. Looked in ")
     if ( _flatbuffers_roots )
-      set(FLATBUFFERS_ERR_MSG "${FLATBUFFERS_ERR_MSG} in ${_flatbuffers_roots}.")
+      set(FLATBUFFERS_ERR_MSG "${FLATBUFFERS_ERR_MSG} ${_flatbuffers_roots}.")
     else ()
       set(FLATBUFFERS_ERR_MSG "${FLATBUFFERS_ERR_MSG} system search paths.")
     endif ()


Mime
View raw message