Skip to content

Commit 6468603

Browse files
kkraus14cursoragent
andcommitted
Fix Windows link.exe: prepend MSVC dir via GITHUB_PATH
CIBW_ENVIRONMENT_WINDOWS PATH modifications were not being applied to the build subprocess. Instead, prepend the MSVC bin dir to PATH via GITHUB_PATH in the same step that sets DISTUTILS_USE_SDK=1, so it is inherited by all subsequent steps including cibuildwheel. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b118bfc commit 6468603

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/build-wheel.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ jobs:
115115
# cmd.exe ~8KB command line limit with build[uv]'s longer PATH).
116116
- name: Set DISTUTILS_USE_SDK (Windows)
117117
if: ${{ startsWith(inputs.host-platform, 'win') }}
118-
run: echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
118+
run: |
119+
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
120+
echo "${VCToolsInstallDir}bin/Hostx64/x64" >> $GITHUB_PATH
119121
120122
# To keep the build workflow simple, all matrix jobs will build a wheel for later use within this workflow.
121123
- name: Build and check cuda.pathfinder wheel
@@ -182,7 +184,6 @@ jobs:
182184
CIBW_ENVIRONMENT_WINDOWS: >
183185
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
184186
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
185-
PATH="${{ env.VCToolsInstallDir }}bin/Hostx64/x64;$PATH"
186187
# check cache stats before leaving cibuildwheel
187188
CIBW_BEFORE_TEST_LINUX: >
188189
"/host/${{ env.SCCACHE_PATH }}" --show-stats
@@ -243,7 +244,6 @@ jobs:
243244
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
244245
CUDA_CORE_BUILD_MAJOR=${{ env.BUILD_CUDA_MAJOR }}
245246
PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})"
246-
PATH="${{ env.VCToolsInstallDir }}bin/Hostx64/x64;$PATH"
247247
# check cache stats before leaving cibuildwheel
248248
CIBW_BEFORE_TEST_LINUX: >
249249
"/host${{ env.SCCACHE_PATH }}" --show-stats
@@ -442,7 +442,6 @@ jobs:
442442
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
443443
CUDA_CORE_BUILD_MAJOR=${{ env.BUILD_PREV_CUDA_MAJOR }}
444444
PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})"
445-
PATH="${{ env.VCToolsInstallDir }}bin/Hostx64/x64;$PATH"
446445
# check cache stats before leaving cibuildwheel
447446
CIBW_BEFORE_TEST_LINUX: >
448447
"/host${{ env.SCCACHE_PATH }}" --show-stats

0 commit comments

Comments
 (0)