Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ os: Visual Studio 2015
environment:
matrix:
- GENERATOR: Visual Studio 14 2015 Win64
# - GENERATOR: Visual Studio 14 2015
PYTHON: "3.5"
ARCH: "64"
MSVC_DEFAULT_OPTIONS: ON
BOOST_ROOT: C:\Libraries\boost_1_63_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0

build_script:
- cd cpp
- mkdir build
- cd build
- cmake -G "%GENERATOR%" -DARROW_CXXFLAGS="/WX" -DARROW_BOOST_USE_SHARED=OFF -DCMAKE_BUILD_TYPE=Release ..
- cmake --build . --config Release
init:
- set MINICONDA=C:\Miniconda35-x64
- set PATH=%MINICONDA%;%MINICONDA%/Scripts;%MINICONDA%/Library/bin;%PATH%

# test_script:
- ctest -VV
build_script:
- call ci\msvc-build.bat
52 changes: 52 additions & 0 deletions ci/msvc-build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@rem Licensed to the Apache Software Foundation (ASF) under one
@rem or more contributor license agreements. See the NOTICE file
@rem distributed with this work for additional information
@rem regarding copyright ownership. The ASF licenses this file
@rem to you under the Apache License, Version 2.0 (the
@rem "License"); you may not use this file except in compliance
@rem with the License. You may obtain a copy of the License at
@rem
@rem http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing,
@rem software distributed under the License is distributed on an
@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@rem KIND, either express or implied. See the License for the
@rem specific language governing permissions and limitations
@rem under the License.

@echo on

set CONDA_ENV=C:\arrow-conda-env
set ARROW_HOME=C:\arrow-install

conda create -p %CONDA_ENV% -q -y python=%PYTHON% ^
six pytest setuptools numpy pandas cython
call activate %CONDA_ENV%

@rem Build and test Arrow C++ libraries

cd cpp
mkdir build
cd build
cmake -G "%GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%ARROW_HOME% ^
-DARROW_BOOST_USE_SHARED=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
-DARROW_CXXFLAGS="/WX" ^
-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%

ctest -VV || exit /B

@rem Build and import pyarrow

set PATH=%ARROW_HOME%\bin;%PATH%

cd ..\..\python
python setup.py build_ext --inplace || exit /B
python -c "import pyarrow" || exit /B
6 changes: 6 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ else()
include(GNUInstallDirs)
endif()

# Compatibility with CMake 3.1
if(POLICY CMP0054)
# http://www.cmake.org/cmake/help/v3.1/policy/CMP0054.html
cmake_policy(SET CMP0054 NEW)
endif()

set(ARROW_SO_VERSION "0")
set(ARROW_ABI_VERSION "${ARROW_SO_VERSION}.0.0")

Expand Down
13 changes: 7 additions & 6 deletions cpp/cmake_modules/FindPythonLibsNew.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@ string(REGEX REPLACE "\\\\" "/" PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
string(REGEX REPLACE "\\\\" "/" PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES})

if(CMAKE_HOST_WIN32)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(PYTHON_LIBRARY
"${PYTHON_PREFIX}/libs/Python${PYTHON_LIBRARY_SUFFIX}.lib")
else()
set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/libpython${PYTHON_LIBRARY_SUFFIX}.a")
endif()
# Appease CMP0054
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(PYTHON_LIBRARY
"${PYTHON_PREFIX}/libs/Python${PYTHON_LIBRARY_SUFFIX}.lib")
else()
set(PYTHON_LIBRARY "${PYTHON_PREFIX}/libs/libpython${PYTHON_LIBRARY_SUFFIX}.a")
endif()
elseif(APPLE)
# In some cases libpythonX.X.dylib is not part of the PYTHON_PREFIX and we
# need to call `python-config --prefix` to determine the correct location.
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake_modules/SetupCxxFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (MSVC)
# insecure, like std::getenv
add_definitions(-D_CRT_SECURE_NO_WARNINGS)

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# clang-cl
set(CXX_COMMON_FLAGS "-EHsc")
elseif(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 19)
Expand Down
12 changes: 7 additions & 5 deletions cpp/src/arrow/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,20 @@ set(ARROW_PYTHON_SHARED_LINK_LIBS
arrow_shared
)

if (MSVC)
set(ARROW_PYTHON_SHARED_LINK_LIBS
${ARROW_PYTHON_SHARED_LINK_LIBS}
${PYTHON_LIBRARIES}
)
endif()

ADD_ARROW_LIB(arrow_python
SOURCES ${ARROW_PYTHON_SRCS}
SHARED_LINK_FLAGS ""
SHARED_LINK_LIBS ${ARROW_PYTHON_SHARED_LINK_LIBS}
STATIC_LINK_LIBS ""
)

if (MSVC)
target_link_libraries(arrow_python_shared
${PYTHON_LIBRARIES})
endif()

if ("${COMPILER_FAMILY}" STREQUAL "clang")
# Clang, be quiet. Python C API has lots of macros
set_property(SOURCE ${ARROW_PYTHON_SRCS}
Expand Down
6 changes: 6 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/../cpp/cmake_mod

include(CMakeParseArguments)

# Compatibility with CMake 3.1
if(POLICY CMP0054)
# http://www.cmake.org/cmake/help/v3.1/policy/CMP0054.html
cmake_policy(SET CMP0054 NEW)
endif()

set(BUILD_SUPPORT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../cpp/build-support")

# Allow "make install" to not depend on all targets.
Expand Down