Skip to content

Commit ef2381e

Browse files
authored
Remove broken symlink when building windows wheels (#120)
* Build wheels for windows * Exclude broken symlink * Remove symlink * Try removing symlink only on Windows
1 parent 86bf7aa commit ef2381e

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

.github/workflows/python-wheels.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -109,38 +109,39 @@ jobs:
109109
name: wheels-musllinux-${{ matrix.platform.target }}
110110
path: dist
111111

112-
# We skip windows for now because the symlinks (for `pyi` typing) give "access denied" on windows.
113-
114-
# windows:
115-
# runs-on: ${{ matrix.platform.runner }}
116-
# strategy:
117-
# matrix:
118-
# platform:
119-
# - runner: windows-latest
120-
# target: x64
121-
# steps:
122-
# - uses: actions/checkout@v4
123-
# with:
124-
# submodules: "recursive"
125-
# # There seem to be linking errors on Windows with the uv-provided Python
126-
# # executables, so we use the Python versions provided by github actions
127-
# # for now.
128-
# # Seems to be this question: https://stackoverflow.com/questions/78557803/python-with-rust-cannot-open-input-file-python3-lib
129-
# - uses: actions/setup-python@v5
130-
# with:
131-
# python-version: 3.13
132-
# architecture: ${{ matrix.platform.target }}
133-
# - name: Build wheels
134-
# uses: PyO3/maturin-action@v1
135-
# with:
136-
# target: ${{ matrix.platform.target }}
137-
# args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 --manifest-path python/Cargo.toml
138-
# sccache: "true"
139-
# - name: Upload wheels
140-
# uses: actions/upload-artifact@v4
141-
# with:
142-
# name: wheels-windows-${{ matrix.platform.target }}
143-
# path: dist
112+
windows:
113+
runs-on: ${{ matrix.platform.runner }}
114+
strategy:
115+
matrix:
116+
platform:
117+
- runner: windows-latest
118+
target: x64
119+
steps:
120+
- uses: actions/checkout@v4
121+
with:
122+
submodules: "recursive"
123+
# There seem to be linking errors on Windows with the uv-provided Python
124+
# executables, so we use the Python versions provided by github actions
125+
# for now.
126+
# Seems to be this question: https://stackoverflow.com/questions/78557803/python-with-rust-cannot-open-input-file-python3-lib
127+
- uses: actions/setup-python@v5
128+
with:
129+
python-version: 3.13
130+
architecture: ${{ matrix.platform.target }}
131+
- name: Remove symlink (not supported in Windows wheels)
132+
run: Remove-Item -Path python/python/async_tiff/store -Force
133+
shell: pwsh
134+
- name: Build wheels
135+
uses: PyO3/maturin-action@v1
136+
with:
137+
target: ${{ matrix.platform.target }}
138+
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 --manifest-path python/Cargo.toml
139+
sccache: "true"
140+
- name: Upload wheels
141+
uses: actions/upload-artifact@v4
142+
with:
143+
name: wheels-windows-${{ matrix.platform.target }}
144+
path: dist
144145

145146
macos:
146147
runs-on: ${{ matrix.platform.runner }}

0 commit comments

Comments
 (0)