[
https://issues.apache.org/jira/browse/ARROW-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430283#comment-16430283
]
ASF GitHub Bot commented on ARROW-2353:
---
pitrou closed pull request #1793: ARROW-2353: [CI] Check correctness of built
wheel on AppVeyor
URL: https://github.com/apache/arrow/pull/1793
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/ci/msvc-build.bat b/ci/msvc-build.bat
index cec14297e..678e29d58 100644
--- a/ci/msvc-build.bat
+++ b/ci/msvc-build.bat
@@ -104,12 +104,12 @@ cmake -G "%GENERATOR%" ^
cmake --build . --target install --config %CONFIGURATION% || exit /B
@rem Needed so python-test.exe works
-set OLD_PYTHONPATH=%PYTHONPATH%
-set
PYTHONPATH=%CONDA_PREFIX%\Lib;%CONDA_PREFIX%\Lib\site-packages;%CONDA_PREFIX%\python35.zip;%CONDA_PREFIX%\DLLs;%CONDA_PREFIX%;%PYTHONPATH%
+set OLD_PYTHONHOME=%PYTHONHOME%
+set PYTHONHOME=%CONDA_PREFIX%
ctest -VV || exit /B
-set PYTHONPATH=%OLD_PYTHONPATH%
+set PYTHONHOME=%OLD_PYTHONHOME%
popd
@rem Build parquet-cpp
@@ -124,7 +124,8 @@ cmake -G "%GENERATOR%" ^
-DCMAKE_INSTALL_PREFIX=%PARQUET_HOME% ^
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
-DPARQUET_BOOST_USE_SHARED=OFF ^
- -DPARQUET_BUILD_TESTS=off .. || exit /B
+ -DPARQUET_BUILD_TESTS=OFF ^
+ .. || exit /B
cmake --build . --target install --config %CONFIGURATION% || exit /B
popd
@@ -135,13 +136,39 @@ popd
pushd python
set PYARROW_CXXFLAGS=/WX
-python setup.py build_ext --with-parquet --bundle-arrow-cpp
--with-static-boost ^
+set PYARROW_CMAKE_GENERATOR=%GENERATOR%
+set PYARROW_BUNDLE_ARROW_CPP=ON
+set PYARROW_BUNDLE_BOOST=OFF
+set PYARROW_WITH_STATIC_BOOST=ON
+set PYARROW_WITH_PARQUET=ON
+
+python setup.py build_ext ^
install -q --single-version-externally-managed --record=record.text ^
-bdist_wheel || exit /B
+bdist_wheel -q || exit /B
+
+for /F %%i in ('dir /B /S dist\*.whl') do set WHEEL_PATH=%%i
@rem Test directly from installed location
+@rem Needed for test_cython
SET PYARROW_PATH=%CONDA_PREFIX%\Lib\site-packages\pyarrow
py.test -r sxX --durations=15 -v %PYARROW_PATH% --parquet || exit /B
popd
+
+@rem Test pyarrow wheel from pristine environment
+
+call deactivate
+
+conda create -n wheel_test -q -y python=%PYTHON%
+
+call activate wheel_test
+
+pip install %WHEEL_PATH% || exit /B
+
+python -c "import pyarrow" || exit /B
+python -c "import pyarrow.parquet" || exit /B
+
+pip install pandas pytest pytest-faulthandler
+
+py.test -r sxX --durations=15 --pyargs pyarrow.tests || exit /B
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index cb3cd7023..fcc1d3cdc 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -141,13 +141,18 @@ endif()
# For any C code, use the same flags.
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
-# set compile output directory
-string (TOLOWER ${CMAKE_BUILD_TYPE} BUILD_SUBDIR_NAME)
+if (MSVC)
+ # MSVC makes its own output directories based on the build configuration
+ set(BUILD_SUBDIR_NAME "")
+else()
+ # Set compile output directory
+ string (TOLOWER ${CMAKE_BUILD_TYPE} BUILD_SUBDIR_NAME)
+endif()
# If build in-source, create the latest symlink. If build out-of-source, which
is
# preferred, simply output the binaries in the build folder
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
- set(BUILD_OUTPUT_ROOT_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/build/${BUILD_SUBDIR_NAME}/")
+ set(BUILD_OUTPUT_ROOT_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/build/${BUILD_SUBDIR_NAME}")
# Link build/latest to the current build directory, to avoid developers
# accidentally running the latest debug build when in fact they're building
# release builds.
@@ -155,15 +160,10 @@ if (${CMAKE_SOURCE_DIR} STREQUAL
${CMAKE_CURRENT_BINARY_DIR})
if (NOT APPLE)
set(MORE_ARGS "-T")
endif()
-EXECUTE_PROCESS(COMMAND ln ${MORE_ARGS} -sf ${BUILD_OUTPUT_ROOT_DIRECTORY}
- ${CMAKE_CURRENT_BINARY_DIR}/build/latest)
+ EXECUTE_PROCESS(COMMAND ln ${MORE_ARGS} -sf ${BUILD_OUTPUT_ROOT_DIRECTORY}
+${CMAKE_CURRENT_BINARY_DIR}/build/latest)
else()
- if (MSVC)
-# MSVC makes its own output directories based on the build configuration
-set(BUILD_OUTPUT_ROOT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/")
- else()
-set(BUILD_OUTPUT_ROOT_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/${BUILD_SUBDIR_NAME}/")
- endif()
+ set(BUILD_OUTPUT_ROOT_DIRECTORY
"${CMAKE_CURRENT_BINARY_DIR}/${BUILD_SUBDIR_NAME}")
endif()
message(STATUS "Build output directory: ${BUILD_OUTPUT_ROOT_DIRECTORY}")
diff --git a/python/pyarrow/tests/test_feather.py
b/python/pyarrow/tests/test_feather.py
index a14673f9f..171f28dfa 100644
--- a/python/pyarrow/tests/test_feather.py
++