Last active
October 4, 2022 13:09
-
-
Save AlenkaF/862074bc603c380c08af4950959f4248 to your computer and use it in GitHub Desktop.
Steps to build PyArrow on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 | |
set CC=cl.exe | |
set CXX=cl.exe | |
conda create -y -n pyarrow-dev -c conda-forge ^ | |
--file arrow\ci\conda_env_cpp.txt ^ | |
--file arrow\ci\conda_env_python.txt ^ | |
--file arrow\ci\conda_env_gandiva.txt ^ | |
python=3.9 | |
conda activate pyarrow-dev | |
set ARROW_HOME=%cd%\arrow-dist | |
set PATH=%ARROW_HOME%\bin;%PATH% | |
set PYARROW_CMAKE_GENERATOR=Ninja | |
set R_LD_LIBRARY_PATH=%cd%\arrow-dist;%R_LD_LIBRARY_PATH% | |
set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1 | |
mkdir arrow\cpp\build | |
pushd arrow\cpp\build | |
cmake -G "Ninja" ^ | |
-DARROW_DEPENDENCY_SOURCE=CONDA ^ | |
-DCMAKE_INSTALL_PREFIX=%ARROW_HOME% ^ | |
-DCMAKE_PREFIX_PATH=%ARROW_HOME% ^ | |
-DARROW_CXXFLAGS="/WX /MP" ^ | |
-DARROW_WITH_LZ4=ON ^ | |
-DARROW_WITH_SNAPPY=ON ^ | |
-DARROW_WITH_ZLIB=ON ^ | |
-DARROW_WITH_ZSTD=ON ^ | |
-DARROW_PARQUET=ON ^ | |
-DPARQUET_REQUIRE_ENCRYPTION=ON ^ | |
-DARROW_PYTHON=ON ^ | |
-DPYTHON_EXECUTABLE="C:\Users\Alenka\anaconda3\envs\pyarrow-dev\python.exe" ^ | |
-DPython3_EXECUTABLE="C:\Users\Alenka\anaconda3\envs\pyarrow-dev\python.exe" ^ | |
.. | |
cmake --build . --target install --config Release | |
popd | |
pushd arrow\python | |
set ARROW_CSV=1 | |
set PYARROW_WITH_DATASET=1 | |
set PYARROW_WITH_PARQUET=1 | |
set PYARROW_WITH_PARQUET_ENCRYPTION=1 | |
set PYARROW_CXXFLAGS=/WX /MP | |
set PYARROW_CPP_HOME=%cd%\pyarrow | |
set PATH=PYARROW_CPP_HOME=%\bin;%PATH% | |
pip install -e . | |
python setup.py build_ext --inplace | |
popd | |
pushd arrow\python | |
python -m pytest pyarrow | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment