Skip to content

Commit

Permalink
Merge pull request #7945 from kmaehashi/add-symlink-attribute
Browse files Browse the repository at this point in the history
Improve symlink handling and preflight
  • Loading branch information
emcastillo committed Oct 20, 2023
2 parents a3194dc + a63377f commit ee00774
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions cupy/_core/include/cupy/_cccl/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libcudacxx symlink=dir
1 change: 1 addition & 0 deletions cupy/_core/include/cupy/_cccl/cub/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cub symlink=dir
1 change: 1 addition & 0 deletions cupy/_core/include/cupy/_cccl/thrust/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
thrust symlink=dir
15 changes: 13 additions & 2 deletions install/cupy_builder/_preflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@


def preflight_check(ctx: Context) -> bool:
if sys.platform not in ('linux', 'win32'):
print('Error: macOS is no longer supported', file=sys.stderr)
return False

source_root = ctx.source_root
is_git = os.path.isdir(os.path.join(source_root, '.git'))
for submodule in ('third_party/cccl',
'cupy/_core/include/cupy/jitify'):
if 0 < len(os.listdir(os.path.join(source_root, submodule))):
continue
dirpath = os.path.join(source_root, submodule)
if os.path.isdir(dirpath):
if 0 < len(os.listdir(dirpath)):
continue
else:
if not is_git:
# sdist does not contain third_party directory
continue

if is_git:
msg = f'''
===========================================================================
Expand Down
2 changes: 0 additions & 2 deletions install/cupy_builder/cupy_setup_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ def make_extensions(ctx: Context, compiler, use_cython):
rpath.append(
'{}{}/cupy/.data/lib'.format(_rpath_base(), '/..' * depth))

if not PLATFORM_WIN32 and not PLATFORM_LINUX:
assert False, "macOS is no longer supported"
if (PLATFORM_LINUX and len(rpath) != 0):
ldflag = '-Wl,'
if PLATFORM_LINUX:
Expand Down

0 comments on commit ee00774

Please sign in to comment.