mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-02 07:34:45 +08:00
- Replace BSD-incompatible in-place sed calls with portable temp-file rewrites. - Remove test-only shell interception and capture generated gateway config directly. - Allow parity tests to use supplied supervisor binaries without resolving a Linux target. - Normalize temporary-directory paths and use portable RPM config installation. - Set a valid setuptools-scm version for Python protobuf generation in Jujutsu checkouts. Signed-off-by: Kris Hicks <khicks@nvidia.com>
66 lines
1.8 KiB
TOML
66 lines
1.8 KiB
TOML
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Python development, build, lint, and format tasks
|
|
|
|
["python:dev"]
|
|
description = "Install the Python SDK in development mode"
|
|
depends = ["python:proto"]
|
|
run = "uv sync --group dev"
|
|
hide = true
|
|
|
|
["build:python:wheel"]
|
|
description = "Build the pure-Python SDK wheel"
|
|
depends = ["python:proto"]
|
|
run = """
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
WHEEL_OUTPUT_DIR=${WHEEL_OUTPUT_DIR:-target/wheels}
|
|
rm -rf "$WHEEL_OUTPUT_DIR"
|
|
mkdir -p "$WHEEL_OUTPUT_DIR"
|
|
|
|
uv build --wheel --out-dir "$WHEEL_OUTPUT_DIR"
|
|
|
|
VERIFY_ARGS=()
|
|
if [ -n "${SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENSHELL:-}" ]; then
|
|
VERIFY_ARGS+=(--expected-version "$SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENSHELL")
|
|
fi
|
|
uv run --no-project python tasks/scripts/verify-python-wheel.py "$WHEEL_OUTPUT_DIR" "${VERIFY_ARGS[@]}"
|
|
"""
|
|
hide = true
|
|
|
|
["python:build"]
|
|
description = "Alias for build:python:wheel"
|
|
depends = ["build:python:wheel"]
|
|
hide = true
|
|
|
|
["python:lint"]
|
|
description = "Lint Python code with ruff"
|
|
depends = ["python:proto"]
|
|
env = { UV_NO_SYNC = "1" }
|
|
run = "uv run ruff check {{vars.python_paths}}"
|
|
hide = true
|
|
|
|
["python:format"]
|
|
description = "Format Python code with ruff"
|
|
run = "uv run ruff format {{vars.python_paths}}"
|
|
hide = true
|
|
|
|
["python:format:check"]
|
|
description = "Check Python formatting with ruff"
|
|
run = "uv run ruff format --check {{vars.python_paths}}"
|
|
hide = true
|
|
|
|
["python:typecheck"]
|
|
description = "Type check Python code with ty"
|
|
depends = ["python:proto"]
|
|
run = "uv run ty check {{vars.python_paths}}"
|
|
hide = true
|
|
|
|
["python:proto"]
|
|
description = "Generate Python protobuf stubs from .proto files"
|
|
env = { SETUPTOOLS_SCM_PRETEND_VERSION_FOR_OPENSHELL = "0.0.0" }
|
|
run = "uv run --frozen python tasks/scripts/generate_python_proto.py"
|
|
hide = true
|