[setup] use env var instead of option for cuda ext (#839)

This commit is contained in:
Frank Lee 2022-04-22 15:44:56 +08:00 committed by GitHub
parent 943982d29a
commit 9f6f656952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,8 +9,7 @@ this_dir = os.path.dirname(os.path.abspath(__file__))
build_cuda_ext = True
ext_modules = []
if '--no_cuda_ext' in sys.argv:
sys.argv.remove('--no_cuda_ext')
if int(os.environ.get('NO_CUDA_EXT', '0')) == 1:
build_cuda_ext = False