Skip to content

build: Self-bootstrap the uv environment for make idma_hw_all#128

Merged
DanielKellerM merged 1 commit into
develfrom
build/self-bootstrap-uv
Jun 16, 2026
Merged

build: Self-bootstrap the uv environment for make idma_hw_all#128
DanielKellerM merged 1 commit into
develfrom
build/self-bootstrap-uv

Conversation

@DanielKellerM

Copy link
Copy Markdown
Collaborator

What

make idma_hw_all (and the other generators) now provision their own Python environment. If Mako/peakrdl are not importable, a local .venv is created via uv sync --locked and prepended to PATH. An already-activated venv or uv run make … (as in CI) is detected and left untouched, so existing flows are unchanged.

Why

Downstream SoCs that pull iDMA via Bender (e.g. pulp_cluster) had to replicate the env setup — uv sync + source .venv/bin/activate — before calling make -C $(bender path idma) idma_hw_all. With this, the low-level handling lives in the IP and a consumer just calls:

generate_idma_rtl:
	$(MAKE) -C $(shell bender path idma) idma_hw_all

Notes

  • Requires uv on PATH when cold; otherwise it errors with the install hint (no silent curl | sh). uv is already a documented prerequisite.
  • Tested locally: cold (no venv, mako-less python) provisions and generates all variants; idempotent re-run reuses the .venv; uv run make idma_hw_all unchanged.

Docs follow-up: simplify the quickstart build snippet (#119) to the bare make idma_hw_all once this lands.

Copilot AI review requested due to automatic review settings June 16, 2026 09:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread idma.mk Outdated
Comment thread idma.mk Outdated
Comment thread idma.mk Outdated
Generating the RTL needs Mako/peakrdl. Previously the caller had to set up
the venv (uv sync + activate, or uv run make). Detect when those deps are
not importable and provision a local .venv via uv sync --locked, prepending
it to PATH. An activated venv or 'uv run make' (CI) is detected and left
untouched, so behavior there is unchanged. Lets a consumer (e.g. a cluster)
just call 'make -C $(bender path idma) idma_hw_all'. Requires uv on PATH.
@DanielKellerM DanielKellerM force-pushed the build/self-bootstrap-uv branch from 65573d0 to a490fbe Compare June 16, 2026 09:59
@DanielKellerM DanielKellerM merged commit 1d8a3c9 into devel Jun 16, 2026
13 checks passed
@DanielKellerM DanielKellerM deleted the build/self-bootstrap-uv branch June 16, 2026 11:14
@DanielKellerM DanielKellerM mentioned this pull request Jun 16, 2026
7 tasks
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.

2 participants