We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 72d09f3 + 0cdc446 commit 94ab2deCopy full SHA for 94ab2de
setup.py
@@ -308,8 +308,13 @@ def build_extension(self, ext) -> None:
308
"-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))]
309
310
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ:
311
+ cpu_count = os.cpu_count()
312
+ if cpu_count is None:
313
+ cpu_count = 1
314
if hasattr(self, "parallel") and self.parallel:
- build_args += [f"-j{self.parallel}"]
315
+ build_args += [f"--parallel={self.parallel}"]
316
+ else:
317
+ build_args += [f"--parallel={cpu_count}"]
318
print("CMake args:", cmake_args)
319
build_temp = Path(ext.sourcedir) / "build"
320
if not build_temp.exists():
0 commit comments