Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] Preserve symlinks in source tree #367

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .pfnci/wheel-windows/_flexci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 3 additions & 0 deletions .pfnci/wheel-windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $ErrorActionPreference = "Stop"
. "$PSScriptRoot\_flexci.ps1"

PrioritizeFlexCIDaemon
EnableLongPaths

function UninstallCuDNN($cuda_path) {
echo "Uninstalling cuDNN installation from ${cuda_path}"
Expand Down Expand Up @@ -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)")
Expand Down
4 changes: 2 additions & 2 deletions dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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))

Expand Down