Skip to content

Commit 27c2594

Browse files
authored
perf(build): parallelize cython extension compilation (#230)
1 parent 6dab427 commit 27c2594

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

build_ext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
class BuildExt(build_ext):
4747
def build_extensions(self) -> None:
48+
if self.parallel is None: # type: ignore[has-type, unused-ignore]
49+
self.parallel = os.cpu_count() or 1
4850
try:
4951
super().build_extensions()
5052
except Exception: # noqa: S110

0 commit comments

Comments
 (0)