Skip to content

Commit

Permalink
Allow for the armv7l scie to be optional for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Dec 13, 2024
1 parent f925872 commit 93a030c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions package/package.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pex-extras = [
# This customization gets us a lockable psutil wheel.
python-version = "3.11.11"
extra-lock-args = ["--index", "https://www.piwheels.org/simple"]
# TODO(John Sirois): Remove once the complete platform file is generated.
required = false

[scie.platforms.linux-x86_64]
[scie.platforms.macos-aarch64]
Expand Down
2 changes: 2 additions & 0 deletions package/scie_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ def load(
pbs_release=platform_data.get("pbs-release", default_pbs_release),
python_version=platform_data.get("python-version", default_python_version),
extra_lock_args=tuple(platform_data.get("extra-lock-args", ())),
required=platform_data.get("required", True),
)

name: str
pbs_release: str
python_version: str
extra_lock_args: tuple[str, ...] = ()
required: bool = True


@dataclass(frozen=True)
Expand Down
14 changes: 8 additions & 6 deletions scripts/create-packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,21 @@ def build_pex_scies(
missing_platforms: list[str] = []
platforms: list[tuple[PlatformConfig, Path]] = []
for platform_config in scie_config.platforms:
complete_platform = PACKAGE_DIR / "complete-platforms" / f"{platform_config}.json"
if not complete_platform.exists():
missing_platforms.append(platform_config.name)
else:
complete_platform = PACKAGE_DIR / "complete-platforms" / f"{platform_config.name}.json"
if complete_platform.exists():
platforms.append((platform_config, complete_platform))
elif platform_config.required:
missing_platforms.append(platform_config.name)

if missing_platforms:
missing = "\n".join(
f"{index}. {missing_platform}"
for index, missing_platform in enumerate(missing_platforms, start=1)
)
raise SystemExit(
f"Of the {len(platforms)} expected Pex scie complete platforms, "
f"{len(missing)} {'is' if len(missing) == 1 else 'are'} missing:\n{missing}"
f"Of the {len(scie_config.platforms)} expected Pex scie complete platforms, "
f"{len(missing_platforms)} {'is' if len(missing_platforms) == 1 else 'are'} missing:\n"
f"{missing}"
)

for platform_config, complete_platform in platforms:
Expand Down

0 comments on commit 93a030c

Please sign in to comment.