Skip to content

Commit fb9bea7

Browse files
committed
maint: add CI jobs to build and test a Windows wheel
1 parent 4ec3a4b commit fb9bea7

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.github/workflows/buildwheel.yml

+55
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,58 @@ jobs:
6161
- run: venv/bin/pip install -U pip
6262
- run: venv/bin/pip install --find-links wheelhouse python_flint
6363
- run: venv/bin/python test/test.py
64+
65+
build_windows:
66+
#
67+
# Test experimental Windows support. These wheels do not yet work due to
68+
#
69+
# https://github.com/fredrik-johansson/python-flint/issues/10
70+
#
71+
# This job tests that building the wheel is possible with mingw-w64 under msys2.
72+
#
73+
name: Build Windows wheel
74+
runs-on: windows-2019
75+
76+
steps:
77+
- uses: actions/checkout@v3
78+
- uses: actions/setup-python@v4
79+
with:
80+
python-version: '3.10'
81+
- uses: msys2/setup-msys2@v2
82+
with:
83+
msystem: mingw64
84+
85+
- run: python -c 'import sys; print(sys.executable)'
86+
87+
- run: msys2 -c 'uname -a'
88+
89+
- run: msys2 -c 'bin/build_mingw64_wheel.sh'
90+
env:
91+
# This is where setup-python puts Python. We want the MSVC-built
92+
# Python rather than an MSYS2 Python.
93+
PYTHONDIR: '/c/hostedtoolcache/windows/Python/3.10.8/x64'
94+
95+
- uses: actions/upload-artifact@v3
96+
with:
97+
path: wheelhouse/*.whl
98+
99+
test_windows:
100+
#
101+
# For now this job is expected to fail.
102+
#
103+
needs: build_windows
104+
name: Test Windows wheel
105+
runs-on: windows-2019
106+
107+
steps:
108+
- uses: actions/checkout@v3
109+
- uses: actions/setup-python@v4
110+
with:
111+
python-version: '3.10'
112+
- uses: actions/download-artifact@v3
113+
with:
114+
name: artifact
115+
path: wheelhouse
116+
- run: python -m pip install -U pip
117+
- run: pip install --find-links wheelhouse python_flint
118+
- run: python test/test.py

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from distutils.sysconfig import get_config_vars
1010

1111
if sys.platform == 'win32':
12-
libraries = ["arb", "flint", "mpir", "mpfr", "pthreads"]
12+
libraries = ["arb", "flint", "mpfr", "gmp"]
1313
else:
1414
libraries = ["arb", "flint"]
1515
(opt,) = get_config_vars('OPT')

0 commit comments

Comments
 (0)