Skip to content

Commit 9016a83

Browse files
authored
GH-44991: [CI][Python] Fix and modernize AppVeyor build (#44999)
1. Use Mambaforge instead of outdated Miniconda install 2. Install PyArrow using pip, not setup.py Also fixes GH-44997. * GitHub Issue: #44991 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Antoine Pitrou <pitrou@free.fr>
1 parent a075bc0 commit 9016a83

File tree

2 files changed

+23
-30
lines changed

2 files changed

+23
-30
lines changed

ci/appveyor-cpp-build.bat

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ IF "%ARROW_DEBUG_MEMORY_POOL%"=="" (
3434
set CMAKE_BUILD_PARALLEL_LEVEL=%NUMBER_OF_PROCESSORS%
3535
set CTEST_PARALLEL_LEVEL=%NUMBER_OF_PROCESSORS%
3636

37-
3837
call activate arrow
3938

4039
@rem The "main" C++ build script for Windows CI
@@ -113,12 +112,12 @@ ctest --output-on-failure || exit /B
113112

114113
popd
115114

115+
pushd python
116+
116117
@rem
117118
@rem Build and install pyarrow
118119
@rem
119120

120-
pushd python
121-
122121
set PYARROW_CMAKE_GENERATOR=%GENERATOR%
123122
set PYARROW_CXXFLAGS=%ARROW_CXXFLAGS%
124123
set PYARROW_PARALLEL=2
@@ -137,6 +136,12 @@ set ARROW_HOME=%CONDA_PREFIX%\Library
137136
@rem ARROW-3075; pkgconfig is broken for Parquet for now
138137
set PARQUET_HOME=%CONDA_PREFIX%\Library
139138

139+
pip install --no-deps --no-build-isolation -vv --editable .
140+
141+
@rem
142+
@rem Run pyarrow tests
143+
@rem
144+
140145
@rem Download IANA Timezone Database to a non-standard location to
141146
@rem test the configurability of the timezone database path
142147
curl https://data.iana.org/time-zones/releases/tzdata2024b.tar.gz --output tzdata.tar.gz || exit /B
@@ -150,12 +155,9 @@ rmdir /s /q %USERPROFILE%\Downloads\tzdata
150155
@rem (only needed for testing purposes)
151156
set PYARROW_TZDATA_PATH=%USERPROFILE%\Downloads\test\tzdata
152157

153-
python setup.py develop -q || exit /B
154-
158+
set AWS_EC2_METADATA_DISABLED=true
155159
set PYTHONDEVMODE=1
156160

157-
py.test -r sxX --durations=15 --pyargs pyarrow.tests || exit /B
161+
python -m pytest -r sxX --durations=15 pyarrow/tests || exit /B
158162

159-
@rem
160-
@rem Wheels are built and tested separately (see ARROW-5142).
161-
@rem
163+
popd

ci/appveyor-cpp-setup.bat

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717

1818
@echo on
1919

20-
set "PATH=C:\Miniconda38-x64;C:\Miniconda38-x64\Scripts;C:\Miniconda38-x64\Library\bin;%PATH%"
20+
@rem
21+
@rem The miniconda install on AppVeyor is very outdated, use Mambaforge instead
22+
@rem
23+
24+
appveyor DownloadFile https://github.com/conda-forge/miniforge/releases/download/24.9.2-0/Mambaforge-Windows-x86_64.exe || exit /B
25+
start /wait "" Mambaforge-Windows-x86_64.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Mambaforge
26+
set "PATH=C:\Mambaforge\scripts;C:\Mambaforge\condabin;%PATH%"
2127

2228
@rem
2329
@rem Avoid picking up AppVeyor-installed OpenSSL (linker errors with gRPC)
@@ -33,26 +39,15 @@ rd /s /q C:\OpenSSL-v30-Win32
3339
rd /s /q C:\OpenSSL-v30-Win64
3440

3541
@rem
36-
@rem Configure miniconda
42+
@rem Configure conda
3743
@rem
3844
conda config --set auto_update_conda false
39-
conda config --set show_channel_urls True
45+
conda config --set show_channel_urls true
46+
conda config --set always_yes true
4047
@rem Help with SSL timeouts to S3
4148
conda config --set remote_connect_timeout_secs 12
42-
@rem Workaround for ARROW-13636
43-
conda config --append disallowed_packages pypy3
44-
conda info -a
45-
46-
@rem
47-
@rem Install Python to the base environment
48-
@rem
49-
conda install -q -y -c conda-forge python=%PYTHON% || exit /B
5049

51-
@rem Can't use conda-libmamba-solver 2.0.0
52-
conda config --set solver classic
53-
54-
@rem Update for newer CA certificates
55-
conda update -q -y -c conda-forge --all || exit /B
50+
conda info -a || exit /B
5651

5752
@rem
5853
@rem Create conda environment
@@ -66,11 +61,8 @@ if "%ARROW_BUILD_GANDIVA%" == "ON" (
6661
)
6762
@rem Install pre-built "toolchain" packages for faster builds
6863
set CONDA_PACKAGES=%CONDA_PACKAGES% --file=ci\conda_env_cpp.txt
69-
@rem Force conda to use conda-forge
70-
conda config --add channels conda-forge
71-
conda config --remove channels defaults
7264
@rem Arrow conda environment
73-
conda create -n arrow -y -c conda-forge ^
65+
conda create -n arrow ^
7466
--file=ci\conda_env_python.txt ^
7567
%CONDA_PACKAGES% ^
7668
"ccache" ^
@@ -97,7 +89,6 @@ if "%ARROW_S3%" == "ON" (
9789
appveyor DownloadFile https://dl.min.io/server/minio/release/windows-amd64/archive/minio.RELEASE.2024-09-13T20-26-02Z -FileName C:\Windows\Minio.exe || exit /B
9890
)
9991

100-
10192
@rem
10293
@rem Download IANA Timezone Database for unit tests
10394
@rem

0 commit comments

Comments
 (0)