build(python): add opt to build with CUDA support

env variables can be set to build python wheels with CUDA support
This commit is contained in:
youben11
2022-09-28 15:07:14 +01:00
committed by Ayoub Benaissa
parent bef178c528
commit 0eedbf4dc4

View File

@@ -42,6 +42,12 @@ class MakeBuild(build_ext):
py_exec = os.environ.get("CONCRETE_COMPILER_Python3_EXECUTABLE")
if py_exec:
cmd.append(f"Python3_EXECUTABLE={py_exec}")
cuda_support = os.environ.get("CONCRETE_COMPILER_CUDA_SUPPORT")
if cuda_support:
cmd.append(f"CUDA_SUPPORT={cuda_support}")
concrete_core_path = os.environ.get("CONCRETE_COMPILER_CONCRETE_CORE_PATH")
if concrete_core_path:
cmd.append(f"CONCRETE_CORE_PATH={concrete_core_path}")
cmd.append(f"BUILD_DIR={build_dir()}")
cmd.append("python-bindings")
subprocess.check_call(cmd)