From eb703fbb3db3c2ea24656d1f737abf6a5a42f6d7 Mon Sep 17 00:00:00 2001 From: rasmith Date: Mon, 26 Oct 2026 16:10:53 -0500 Subject: [PATCH] [BugFix] [Build] Fix for where setup.py fails with MAX_JOBS invalid literal error (#45188) Signed-off-by: Randall Smith Co-authored-by: Micah Williamson --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cf99ec3aaaf..8859d0a9367 100644 --- a/setup.py +++ b/setup.py @@ -216,7 +216,7 @@ class cmake_build_ext(build_ext): # `num_jobs` is either the value of the MAX_JOBS environment variable # (if defined) or the number of CPUs available. num_jobs = envs.MAX_JOBS - if num_jobs is not None: + if isinstance(num_jobs, str) and num_jobs.isnumeric(): num_jobs = int(num_jobs) logger.info("Using MAX_JOBS=%d as the number of jobs.", num_jobs) else: