diff --git a/.pfnci/wheel-windows/_flexci.ps1 b/.pfnci/wheel-windows/_flexci.ps1 index dc7b1c4e..c395f835 100644 --- a/.pfnci/wheel-windows/_flexci.ps1 +++ b/.pfnci/wheel-windows/_flexci.ps1 @@ -102,3 +102,7 @@ function PrioritizeFlexCIDaemon() { throw "Failed to change priority of daemon (exit code = $LastExitCode)" } } + +function EnableLongPaths() { + Set-ItemProperty "Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -value 1 +} diff --git a/.pfnci/wheel-windows/build.ps1 b/.pfnci/wheel-windows/build.ps1 index 99073682..0ed99d13 100644 --- a/.pfnci/wheel-windows/build.ps1 +++ b/.pfnci/wheel-windows/build.ps1 @@ -11,6 +11,7 @@ $ErrorActionPreference = "Stop" . "$PSScriptRoot\_flexci.ps1" PrioritizeFlexCIDaemon +EnableLongPaths function UninstallCuDNN($cuda_path) { echo "Uninstalling cuDNN installation from ${cuda_path}" @@ -55,6 +56,8 @@ echo ">> Using Branch: $branch" # Clone CuPy and checkout the target branch RunOrDie git clone --recursive --branch $branch --depth 1 https://github.com/cupy/cupy.git cupy +RunOrDie git -C cupy config core.symlinks true +RunOrDie git -C cupy reset --hard # Get Cython version from configuration. $cython_version = @(python -c "import dist_config; print(dist_config.CYTHON_VERSION)") diff --git a/dist.py b/dist.py index 4f5d03d0..2ededa4c 100755 --- a/dist.py +++ b/dist.py @@ -386,7 +386,7 @@ def build_linux( # Copy source tree to working directory. log('Copying source tree from: {}'.format(source)) - shutil.copytree(source, '{}/cupy'.format(workdir)) + shutil.copytree(source, '{}/cupy'.format(workdir), symlinks=True) # Add long description file. with open('{}/description.rst'.format(workdir), 'w') as f: @@ -541,7 +541,7 @@ def build_windows( try: log('Using working directory: {}'.format(workdir)) - # Copy source tree and NCCL to working directory. + # Copy source tree to working directory. log('Copying source tree from: {}'.format(source)) shutil.copytree(source, '{}/cupy'.format(workdir))