Skip to content

Apache DataFusion SQL Query Engine

ARROW-8741: [Python][Packaging] Keep VS2015 with for the windows wheels

Krisztián Szűcs6624f5bfbb4f
diff --git a/dev/tasks/python-wheels/appveyor.yml b/dev/tasks/python-wheels/appveyor.yml
index 0782f2cbf8..b2df013604 100644
--- a/dev/tasks/python-wheels/appveyor.yml
+++ b/dev/tasks/python-wheels/appveyor.yml
@@ -21,9 +21,9 @@ environment:
ARCH: "64"
GENERATOR: Visual Studio 14 2015 Win64
PYTHON_VERSION: "{{ python_version }}"
+ PYTHON_INTERPRETER: {{ python_interpreter }}
ARROW_SRC: C:\apache-arrow
PYARROW_VERSION: {{ arrow.no_rc_version }}
- PYARROW_REF: {{ arrow.head }}
init:
- set MINICONDA=C:\Miniconda3-x64
@@ -47,6 +47,9 @@ build_script:
- rd /s /q C:\OpenSSL-v111-Win32
- rd /s /q C:\OpenSSL-v111-Win64
+ # Disable vcpkg to prevent unrelated noisy link warnings
+ - vcpkg integrate remove
+
- call %ARROW_SRC%\dev\tasks\python-wheels\{{ script }}
after_build:
diff --git a/dev/tasks/python-wheels/win-build-3.5.bat b/dev/tasks/python-wheels/win-build-3.5.bat
deleted file mode 100644
index 1e2d2cab6f..0000000000
--- a/dev/tasks/python-wheels/win-build-3.5.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@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
-
-@rem create conda environment for compiling
-call conda update --yes --quiet conda
-
-call conda create -n wheel-build -q -y -c conda-forge ^
- "boost-cpp>=1.68.0" ^
- "python=3.5" ^
- zlib || exit /B
-
-call conda.bat activate wheel-build
-
-@rem Cannot use conda_env_python.yml here because conda-forge has
-@rem ceased providing up-to-date packages for Python 3.5
-pip install -r %ARROW_SRC%\python\requirements-wheel-build.txt
-
-set ARROW_HOME=%CONDA_PREFIX%\Library
-set PARQUET_HOME=%CONDA_PREFIX%\Library
-echo %ARROW_HOME%
-
-@rem Build Arrow C++ libraries
-mkdir %ARROW_SRC%\cpp\build
-pushd %ARROW_SRC%\cpp\build
-
-cmake -G "%GENERATOR%" ^
- -DCMAKE_INSTALL_PREFIX=%ARROW_HOME% ^
- -DARROW_BOOST_USE_SHARED=OFF ^
- -DCMAKE_BUILD_TYPE=Release ^
- -DARROW_DEPENDENCY_SOURCE=BUNDLED ^
- -DZLIB_SOURCE=SYSTEM ^
- -DBOOST_SOURCE=SYSTEM ^
- -DZLIB_ROOT=%CONDA_PREFIX%\Library ^
- -DARROW_CXXFLAGS="/MP" ^
- -DARROW_WITH_ZLIB=ON ^
- -DARROW_WITH_ZSTD=ON ^
- -DARROW_WITH_LZ4=ON ^
- -DARROW_WITH_SNAPPY=ON ^
- -DARROW_WITH_BROTLI=ON ^
- -DARROW_PYTHON=ON ^
- -DARROW_PARQUET=ON ^
- .. || exit /B
-cmake --build . --target install --config Release || exit /B
-popd
-
-set PYARROW_BUILD_TYPE=Release
-set PYARROW_PARALLEL=8
-set PYARROW_WITH_PARQUET=1
-set PYARROW_WITH_STATIC_BOOST=1
-set PYARROW_BUNDLE_ARROW_CPP=1
-set SETUPTOOLS_SCM_PRETEND_VERSION=%PYARROW_VERSION%
-
-pushd %ARROW_SRC%\python
-python setup.py build_ext --extra-cmake-args="-DZLIB_ROOT=%CONDA_PREFIX%\Library" bdist_wheel || exit /B
-popd
-
-call conda.bat deactivate
-
-set ARROW_TEST_DATA=%ARROW_SRC%\testing\data
-
-@rem test the wheel
-@rem TODO For maximum reliability, we should test in a plain virtualenv instead.
-call conda create -n wheel-test -c conda-forge -q -y python=3.5 || exit /B
-call conda.bat activate wheel-test
-
-@rem install the built wheel
-pip install %ARROW_SRC%\python\dist\pyarrow-%PYARROW_VERSION%-cp35-cp35m-win_amd64.whl || exit /B
-pip install -r %ARROW_SRC%\python\requirements-wheel-test.txt || exit /B
-
-@rem test the imports
-python -c "import pyarrow; import pyarrow.parquet" || exit /B
-
-@rem run the python tests
-pytest -rs --pyargs pyarrow || exit /B
diff --git a/dev/tasks/python-wheels/win-build.bat b/dev/tasks/python-wheels/win-build.bat
index f26973e861..b7bd25faef 100644
--- a/dev/tasks/python-wheels/win-build.bat
+++ b/dev/tasks/python-wheels/win-build.bat
@@ -18,11 +18,10 @@
@echo on
@rem create conda environment for compiling
-call conda update --yes --quiet conda
-
call conda create -n wheel-build -q -y -c conda-forge ^
--file=%ARROW_SRC%\ci\conda_env_cpp.yml ^
--file=%ARROW_SRC%\ci\conda_env_gandiva.yml ^
+ "vs2015_runtime<14.16" ^
python=%PYTHON_VERSION% || exit /B
call conda.bat activate wheel-build
@@ -63,6 +62,7 @@ cmake -G "%GENERATOR%" ^
-DARROW_PYTHON=ON ^
-DARROW_PARQUET=ON ^
-DARROW_GANDIVA=ON ^
+ -DARROW_MIMAllOC=ON ^
-DZSTD_SOURCE=BUNDLED ^
.. || exit /B
cmake --build . --target install --config Release || exit /B
@@ -86,17 +86,20 @@ call conda.bat deactivate
set ARROW_TEST_DATA=%ARROW_SRC%\testing\data
-@rem test the wheel
-@rem TODO For maximum reliability, we should test in a plain virtualenv instead.
-call conda create -n wheel-test -c conda-forge -q -y python=%PYTHON_VERSION% || exit /B
-call conda.bat activate wheel-test
+@rem install the test dependencies
+%PYTHON_INTERPRETER% -m pip install -r %ARROW_SRC%\python\requirements-wheel-test.txt || exit /B
-@rem install the built wheel
-pip install -r %ARROW_SRC%\python\requirements-wheel-test.txt || exit /B
-pip install --no-index --find-links=%ARROW_SRC%\python\dist\ pyarrow || exit /B
+@rem install the produced wheel in a non-conda environment
+%PYTHON_INTERPRETER% -m pip install --no-index --find-links=%ARROW_SRC%\python\dist\ pyarrow || exit /B
@rem test the imports
-python -c "import pyarrow; import pyarrow.parquet; import pyarrow.flight; import pyarrow.dataset; import pyarrow.gandiva;" || exit /B
-
-@rem run the python tests
-pytest -rs --pyargs pyarrow || exit /B
+%PYTHON_INTERPRETER% -c "import pyarrow" || exit /B
+%PYTHON_INTERPRETER% -c "import pyarrow.parquet" || exit /B
+%PYTHON_INTERPRETER% -c "import pyarrow.flight" || exit /B
+%PYTHON_INTERPRETER% -c "import pyarrow.gandiva" || exit /B
+%PYTHON_INTERPRETER% -c "import pyarrow.dataset" || exit /B
+
+@rem run the python tests, but disable the cython because there is a linking
+@rem issue on python 3.8
+set PYARROW_TEST_CYTHON=OFF
+%PYTHON_INTERPRETER% -m pytest -rs --pyargs pyarrow || exit /B
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index c70295e0c4..528f375602 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -417,8 +417,9 @@ tasks:
ci: appveyor
template: python-wheels/appveyor.yml
params:
- script: win-build-3.5.bat
+ script: win-build.bat
python_version: 3.5
+ python_interpreter: C:\Python35-x64\python.exe
artifacts:
- pyarrow-{no_rc_version}-cp35-cp35m-win_amd64.whl
@@ -428,6 +429,7 @@ tasks:
params:
script: win-build.bat
python_version: 3.6
+ python_interpreter: C:\Python36-x64\python.exe
artifacts:
- pyarrow-{no_rc_version}-cp36-cp36m-win_amd64.whl
@@ -437,6 +439,7 @@ tasks:
params:
script: win-build.bat
python_version: 3.7
+ python_interpreter: C:\Python37-x64\python.exe
artifacts:
- pyarrow-{no_rc_version}-cp37-cp37m-win_amd64.whl
@@ -446,6 +449,7 @@ tasks:
params:
script: win-build.bat
python_version: 3.8
+ python_interpreter: C:\Python38-x64\python.exe
artifacts:
- pyarrow-{no_rc_version}-cp38-cp38-win_amd64.whl