INNER CODE UNIT · Python

current_platform

ExplosionEngine/Explosion · ThirdParty/ConanRecipes/build_recipes.py:39

def current_platform() -> str:
    system = platform.system()
    machine = platform.machine().lower()
    if system == "Windows" and machine in ("amd64", "x86_64"):
        return "Windows-x86_64"
    if system == "Darwin" and machine in ("arm64", "aarch64"):
        return "Macos-armv8"
    if system == "Linux" and machine in ("amd64", "x86_64"):
        return "Linux-x86_64"
    sys.exit(
        f"error: unsupported host {system}/{platform.machine()}; "
        f"only {', '.join(SUPPORTED_PLATFORMS)} are supported"
    )


class Recipe:
    def __init__(self, path: Path):
        self.path = path

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…