Skip to content

Commit 0caa95e

Browse files
committed
Install arrow cpp on c:\arrow-dist and manually move lib\*.lib to bin along dlls
1 parent 09b4950 commit 0caa95e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

‎ci/scripts/python_wheel_windows_build.bat‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliar
2929

3030
echo "=== (%PYTHON%) Clear output directories and leftovers ==="
3131
del /s /q C:\arrow-build
32+
del /s /q C:\arrow-dist
3233
del /s /q C:\arrow\python\dist
3334
del /s /q C:\arrow\python\build
3435
del /s /q C:\arrow\python\pyarrow\*.so
@@ -95,6 +96,7 @@ cmake ^
9596
-DARROW_WITH_ZLIB=%ARROW_WITH_ZLIB% ^
9697
-DARROW_WITH_ZSTD=%ARROW_WITH_ZSTD% ^
9798
-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
99+
-DCMAKE_INSTALL_PREFIX=C:\arrow-dist ^
98100
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=%CMAKE_INTERPROCEDURAL_OPTIMIZATION% ^
99101
-DCMAKE_UNITY_BUILD=%CMAKE_UNITY_BUILD% ^
100102
-DMSVC_LINK_VERBOSE=ON ^
@@ -211,7 +213,7 @@ pushd C:\arrow\python
211213
-Csetup-args="-Dparquet_require_encryption=%PYARROW_WITH_PARQUET_ENCRYPTION%" ^
212214
-Csetup-args="-Dsubstrait=%PYARROW_WITH_SUBSTRAIT%" ^
213215
-Csetup-args="-Ds3=%PYARROW_WITH_S3%" ^
214-
-Csetup-args="--cmake-prefix-path=C:\Program Files\arrow" || exit /B 1
216+
-Csetup-args="--cmake-prefix-path=C:\arrow-dist" || exit /B 1
215217

216218
@REM Repair the wheel with delvewheel
217219
@REM
@@ -220,13 +222,15 @@ pushd C:\arrow\python
220222
@REM required by multiple Python libraries in the same process.
221223
%PYTHON_CMD% -m pip install delvewheel || exit /B 1
222224

225+
@REM Copy .lib files to bin directory for delvewheel to find them
226+
copy C:\arrow-dist\lib\*.lib C:\arrow-dist\bin\ || exit /B 1
227+
223228
for /f %%i in ('dir dist\pyarrow-*.whl /B') do (set WHEEL_NAME=%cd%\dist\%%i) || exit /B 1
224229
echo "Wheel name: %WHEEL_NAME%"
225230

226231
%PYTHON_CMD% -m delvewheel repair -vv ^
227-
--ignore-existing --with-mangle ^
228-
--add-path "C:\Program Files\arrow\bin" ^
229-
--include-imports "C:\Program Files\arrow\lib" ^
232+
--ignore-existing --with-mangle --include-imports ^
233+
--add-path "C:\arrow-dist\bin" ^
230234
-w repaired_wheels %WHEEL_NAME% || exit /B 1
231235

232236
popd

0 commit comments

Comments
 (0)