Skip to content

Commit

Permalink
ENH: Configure wheel name when CUDA is used
Browse files Browse the repository at this point in the history
Parse CMake arguments in setup.py to extract CUDA version from
CUDAToolkit_ROOT.

WARNING: This works only on Linux when users keep the default installation
path for CUDA. Future commits should use a more robust approach that works
on Windows too.
  • Loading branch information
LucasGandel committed Apr 12, 2022
1 parent 28876b6 commit 1540c58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@
print(' python -m pip install scikit-build')
sys.exit(1)

# Configure wheel name if CUDA is used
wheel_name='itk-rtk'
# Extract cuda version from the last folder name in CUDAToolkit_ROOT path.
for arg in sys.argv:
if "CUDAToolkit_ROOT" in str(arg):
wheel_name += ('-' + arg.rsplit('/', 1)[-1])

setup(
name='itk-rtk',
name=wheel_name,
version='2.3.0',
author='RTK Consortium',
author_email='rtk-users@openrtk.org',
Expand Down

0 comments on commit 1540c58

Please sign in to comment.