Skip to content

Commit 8214ad1

Browse files
kkraus14cursoragent
andcommitted
Fix Windows link.exe shadowing and cuda-core test group self-reference
- Replace cuda-core[test] with {include-group = "test"} in cuda-core's test-cu* dependency groups. The self-reference triggered setuptools_scm via the build backend in CI containers without full git context. - Pass VCToolsInstallDir through CIBW_ENVIRONMENT_PASS_WINDOWS and prepend its bin dir to PATH so MSVC's link.exe is found instead of Git's /usr/bin/link.exe when DISTUTILS_USE_SDK=1 skips vcvarsall.bat. - Regenerate uv.lock. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7818669 commit 8214ad1

File tree

3 files changed

+50
-15
lines changed

3 files changed

+50
-15
lines changed

.github/workflows/build-wheel.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ jobs:
178178
SCCACHE_DIR=/host/${{ env.SCCACHE_DIR }}
179179
SCCACHE_CACHE_SIZE=${{ env.SCCACHE_CACHE_SIZE }}
180180
CIBW_ENVIRONMENT_PASS_WINDOWS: >
181-
DISTUTILS_USE_SDK INCLUDE LIB
181+
DISTUTILS_USE_SDK INCLUDE LIB VCToolsInstallDir
182182
CIBW_ENVIRONMENT_WINDOWS: >
183183
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
184184
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
185+
PATH="$VCToolsInstallDir/bin/Hostx64/x64;$PATH"
185186
# check cache stats before leaving cibuildwheel
186187
CIBW_BEFORE_TEST_LINUX: >
187188
"/host/${{ env.SCCACHE_PATH }}" --show-stats
@@ -236,12 +237,13 @@ jobs:
236237
SCCACHE_DIR=/host/${{ env.SCCACHE_DIR }}
237238
SCCACHE_CACHE_SIZE=${{ env.SCCACHE_CACHE_SIZE }}
238239
CIBW_ENVIRONMENT_PASS_WINDOWS: >
239-
DISTUTILS_USE_SDK INCLUDE LIB
240+
DISTUTILS_USE_SDK INCLUDE LIB VCToolsInstallDir
240241
CIBW_ENVIRONMENT_WINDOWS: >
241242
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
242243
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
243244
CUDA_CORE_BUILD_MAJOR=${{ env.BUILD_CUDA_MAJOR }}
244245
PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})"
246+
PATH="$VCToolsInstallDir/bin/Hostx64/x64;$PATH"
245247
# check cache stats before leaving cibuildwheel
246248
CIBW_BEFORE_TEST_LINUX: >
247249
"/host${{ env.SCCACHE_PATH }}" --show-stats
@@ -434,12 +436,13 @@ jobs:
434436
SCCACHE_DIR=/host/${{ env.SCCACHE_DIR }}
435437
SCCACHE_CACHE_SIZE=${{ env.SCCACHE_CACHE_SIZE }}
436438
CIBW_ENVIRONMENT_PASS_WINDOWS: >
437-
DISTUTILS_USE_SDK INCLUDE LIB
439+
DISTUTILS_USE_SDK INCLUDE LIB VCToolsInstallDir
438440
CIBW_ENVIRONMENT_WINDOWS: >
439441
CUDA_PATH="$(cygpath -w ${{ env.CUDA_PATH }})"
440442
CUDA_PYTHON_PARALLEL_LEVEL=${{ env.CUDA_PYTHON_PARALLEL_LEVEL }}
441443
CUDA_CORE_BUILD_MAJOR=${{ env.BUILD_PREV_CUDA_MAJOR }}
442444
PIP_FIND_LINKS="$(cygpath -w ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }})"
445+
PATH="$VCToolsInstallDir/bin/Hostx64/x64;$PATH"
443446
# check cache stats before leaving cibuildwheel
444447
CIBW_BEFORE_TEST_LINUX: >
445448
"/host${{ env.SCCACHE_PATH }}" --show-stats

cuda_core/pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ cu13 = ["cuda-bindings[all]==13.*"]
6060

6161
[dependency-groups]
6262
test = ["cython>=3.2,<3.3", "setuptools", "pytest>=6.2.4", "pytest-randomly", "pytest-repeat"]
63-
test-cu12 = ["cuda-core[test]", "cupy-cuda12x; python_version < '3.14'", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
64-
test-cu13 = ["cuda-core[test]", "cupy-cuda13x; python_version < '3.14'", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
63+
test-cu12 = [{include-group = "test"}, "cupy-cuda12x; python_version < '3.14'", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
64+
test-cu13 = [{include-group = "test"}, "cupy-cuda13x; python_version < '3.14'", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
6565
# free threaded build, cupy doesn't support free-threaded builds yet, so avoid installing it for now
6666
# TODO: cupy should support free threaded builds
67-
test-cu12-ft = ["cuda-core[test]", "cuda-toolkit[cudart]==12.*"]
68-
test-cu13-ft = ["cuda-core[test]", "cuda-toolkit[cudart]==13.*"]
67+
test-cu12-ft = [{include-group = "test"}, "cuda-toolkit[cudart]==12.*"]
68+
test-cu13-ft = [{include-group = "test"}, "cuda-toolkit[cudart]==13.*"]
6969

7070
[project.urls]
7171
homepage = "https://nvidia.github.io/cuda-python/"

0 commit comments

Comments
 (0)