This is an automated email from the ASF dual-hosted git repository.
kou 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 fd6f545 ARROW-9666: [Python][wheel][Windows] Fix wheel build for
Windows
fd6f545 is described below
commit fd6f5451d2bc4277f88cf42c2d7d6b71c503a380
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Aug 7 09:34:07 2020 +0900
ARROW-9666: [Python][wheel][Windows] Fix wheel build for Windows
It's caused by ARROW-9412 https://github.com/apache/arrow/pull/7842 .
Closes #7914 from kou/python-wheel-windows-fix-link
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/DefineOptions.cmake | 10 +++++++++-
cpp/cmake_modules/FindSnappy.cmake | 9 ++++-----
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/cpp/cmake_modules/DefineOptions.cmake
b/cpp/cmake_modules/DefineOptions.cmake
index 555099f..cf860cb 100644
--- a/cpp/cmake_modules/DefineOptions.cmake
+++ b/cpp/cmake_modules/DefineOptions.cmake
@@ -364,8 +364,16 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL
"${CMAKE_CURRENT_SOURCE_DIR}")
define_option_string(RE2_MSVC_STATIC_LIB_SUFFIX
"re2 static lib suffix used on Windows with MSVC"
"_static")
+ if(DEFINED ENV{CONDA_PREFIX})
+ # Conda package changes the output name.
+ #
https://github.com/conda-forge/snappy-feedstock/blob/master/recipe/windows-static-lib-name.patch
+ set(SNAPPY_MSVC_STATIC_LIB_SUFFIX_DEFAULT "_static")
+ else()
+ set(SNAPPY_MSVC_STATIC_LIB_SUFFIX_DEFAULT "")
+ endif()
define_option_string(SNAPPY_MSVC_STATIC_LIB_SUFFIX
- "Snappy static lib suffix used on Windows with MSVC"
"_static")
+ "Snappy static lib suffix used on Windows with MSVC"
+ "${SNAPPY_MSVC_STATIC_LIB_SUFFIX_DEFAULT}")
define_option_string(LZ4_MSVC_STATIC_LIB_SUFFIX
"Lz4 static lib suffix used on Windows with MSVC"
"_static")
diff --git a/cpp/cmake_modules/FindSnappy.cmake
b/cpp/cmake_modules/FindSnappy.cmake
index 7be7fb2..24fdf10 100644
--- a/cpp/cmake_modules/FindSnappy.cmake
+++ b/cpp/cmake_modules/FindSnappy.cmake
@@ -24,12 +24,11 @@ if(ARROW_SNAPPY_USE_SHARED)
list(APPEND SNAPPY_LIB_NAMES
"${CMAKE_SHARED_LIBRARY_PREFIX}snappy${CMAKE_SHARED_LIBRARY_SUFFIX}")
else()
- if(MSVC AND DEFINED ENV{CONDA_PREFIX})
- # Conda package changes the output name.
- #
https://github.com/conda-forge/snappy-feedstock/blob/master/recipe/windows-static-lib-name.patch
- set(SNAPPY_LIB_NAMES
"${CMAKE_STATIC_LIBRARY_PREFIX}snappy_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ set(SNAPPY_STATIC_LIB_NAME_BASE "snappy")
+ if(MSVC)
+ set(SNAPPY_STATIC_LIB_NAME_BASE
"${SNAPPY_STATIC_LIB_NAME_BASE}${SNAPPY_MSVC_STATIC_LIB_SUFFIX}")
endif()
- set(SNAPPY_LIB_NAMES
"${CMAKE_STATIC_LIBRARY_PREFIX}snappy${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ set(SNAPPY_LIB_NAMES
"${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_STATIC_LIB_NAME_BASE}${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()
if(Snappy_ROOT)