feat: add CIBW_ALLOW_EMPTY environment variable (#1937)

Co-authored-by: Matthieu Darbois <mayeut@users.noreply.github.com>
This commit is contained in:
Conor MacBride
2024-07-23 09:25:09 +01:00
committed by GitHub
co-authored by Matthieu Darbois
parent 5af5df4e4f
commit d4c332104d
4 changed files with 39 additions and 5 deletions
+4
View File
@@ -75,6 +75,7 @@ class GlobalOptions:
build_selector: BuildSelector
test_selector: TestSelector
architectures: set[Architecture]
allow_empty: bool
@dataclasses.dataclass(frozen=True)
@@ -520,6 +521,8 @@ class Options:
self.reader.get("free-threaded-support", env_plat=False, ignore_empty=True)
)
allow_empty = args.allow_empty or strtobool(self.env.get("CIBW_ALLOW_EMPTY", "0"))
prerelease_pythons = args.prerelease_pythons or strtobool(
self.env.get("CIBW_PRERELEASE_PYTHONS", "0")
)
@@ -557,6 +560,7 @@ class Options:
build_selector=build_selector,
test_selector=test_selector,
architectures=architectures,
allow_empty=allow_empty,
)
def build_options(self, identifier: str | None) -> BuildOptions: