diff --git a/setup.py b/setup.py index 59b468f8c93..bd3e5ae52e7 100644 --- a/setup.py +++ b/setup.py @@ -169,7 +169,7 @@ def write_to_python_file(cls, path: str) -> None: # set to a non-empty value, the build type is Debug. Otherwise, the build type # is Release. def get_build_type(is_debug=None) -> str: - debug = int(os.environ.get("DEBUG", 0)) if is_debug is None else is_debug + debug = int(os.environ.get("DEBUG", 0) or 0) if is_debug is None else is_debug cfg = "Debug" if debug else "Release" return cfg