Skip to content

rbio: add @requires decorator + mtime-gated common sdist rebuild#3583

Open
davidsmejia wants to merge 1 commit into
feature/rbio-scripts-migrationfrom
davidsmejia/3572-01-rbio-foundation
Open

rbio: add @requires decorator + mtime-gated common sdist rebuild#3583
davidsmejia wants to merge 1 commit into
feature/rbio-scripts-migrationfrom
davidsmejia/3572-01-rbio-foundation

Conversation

@davidsmejia
Copy link
Copy Markdown
Contributor

Issue Number

#3572

Purpose/Implementation Notes

  • bin/lib/_requirements.py (new) — @requires(env=, env_optional=, tools=)
    decorator + epilog_from() helper. Commands declare their env vars and
    external tool deps; future debug:env / debug:deps will read this
    registry to render per-command and aggregate views.
  • bin/lib/common.py — factor the inline sdist rebuild out of cmd_common_update
    into rebuild_common_sdist(), which now:
    • uses an mtime gate to skip the rebuild when no common source file
      is newer than the existing sdist (preserves docker COPY layer cache
      for downstream worker/foreman/api images)
    • prefers dr_env/bin/python3 when the venv is present (system python3
      lacks setuptools on PEP-668 distros)
      Surfaces the helper as a standalone command, rbio common:build-sdist.
  • bin/lib/build.py — invoke rebuild_common_sdist() before bake so
    downstream targets pick up the latest common package. No-op when source
    is unchanged (gate above).

Methods

N/A

Types of changes

  • New feature (non-breaking change which adds functionality)

Functional tests

rbio functional tests only

Checklist

  • Lint and unit tests pass locally with my changes

Screenshots

N/A

@davidsmejia davidsmejia changed the base branch from dev to feature/rbio-scripts-migration May 26, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant