Skip to content

Commit 5efe787

Browse files
committed
BLD: allow to build with non-MSVC compilers on Windows
Always passing --vsenv to meson means pandas can't be built with gcc/clang on Windows. Instead add it to the cibuildwheel config so MSVC is still forced in CI when building wheels, and in various places where it is built via pip.
1 parent 2e141aa commit 5efe787

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.github/actions/build_pandas/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ runs:
2626
run: |
2727
if [[ ${{ inputs.editable }} == "true" ]]; then
2828
pip install -e . --no-build-isolation -v --no-deps \
29-
-Csetup-args="--werror"
29+
-Csetup-args="--werror" -Csetup-args="--vsenv"
3030
else
3131
pip install . --no-build-isolation -v --no-deps \
32-
-Csetup-args="--werror"
32+
-Csetup-args="--werror" -Csetup-args="--vsenv"
3333
fi
3434
shell: bash -el {0}

.github/workflows/unit-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ jobs:
356356
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
357357
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
358358
python -m pip install versioneer[toml] python-dateutil tzdata cython hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
359-
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
359+
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror" -Csetup-args="--vsenv"
360360
python -m pip list
361361
362362
- name: Run Tests

pyproject.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ versionfile_build = "pandas/_version.py"
143143
tag_prefix = "v"
144144
parentdir_prefix = "pandas-"
145145

146-
[tool.meson-python.args]
147-
setup = ['--vsenv'] # For Windows
148-
149146
[tool.cibuildwheel]
150147
skip = "cp36-* cp37-* cp38-* cp39-* pp* *_i686 *_ppc64le *_s390x"
151148
build-verbosity = 3
@@ -162,6 +159,7 @@ before-build = "PACKAGE_DIR={package} bash {package}/scripts/cibw_before_build.s
162159
[tool.cibuildwheel.windows]
163160
environment = {}
164161
before-build = "pip install delvewheel && bash {package}/scripts/cibw_before_build_windows.sh"
162+
config-settings = "setup-args=--vsenv"
165163
test-command = """
166164
set PANDAS_CI='1' && \
167165
python -c "import pandas as pd; \

0 commit comments

Comments
 (0)