Support env var for num build jobs (#11073)

This commit is contained in:
Adriane Boyd 2022-07-04 20:50:16 +02:00 committed by GitHub
parent d36d66b7ca
commit 78a84f0d78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,6 +126,8 @@ class build_ext_options:
class build_ext_subclass(build_ext, build_ext_options):
def build_extensions(self):
if not self.parallel:
self.parallel = int(os.environ.get("SPACY_NUM_BUILD_JOBS", 1))
build_ext_options.build_options(self)
build_ext.build_extensions(self)