# Copyright 2026, Jiri Eischmann <jiri@eischmann.cz> and the meshy contributors
# SPDX-License-Identifier: GPL-3.0-or-later

"""Platform detection utilities for cross-platform support."""

import sys


def get_platform():
    """Return 'linux', 'macos', or 'other' based on the current platform."""
    if sys.platform == "darwin":
        return "macos"
    if sys.platform.startswith("linux"):
        return "linux"
    return "other"


def is_macos():
    """Return True if running on macOS."""
    return sys.platform == "darwin"


def is_linux():
    """Return True if running on Linux."""
    return sys.platform.startswith("linux")
