fix: use venv python in agent-bootstrap to fix PEP 668 environments#1605
Closed
KJyang-0114 wants to merge 3 commits intovllm-project:mainfrom
Closed
fix: use venv python in agent-bootstrap to fix PEP 668 environments#1605KJyang-0114 wants to merge 3 commits intovllm-project:mainfrom
KJyang-0114 wants to merge 3 commits intovllm-project:mainfrom
Conversation
Fixes issue vllm-project#1598. On Homebrew-managed Python environments that enforce PEP 668 (externally-managed-environment), 'make agent-bootstrap' fails because it calls 'python3 -m pip install' directly on the system Python. Fix: introduce AGENT_VENV_DIR (.venv-agent) and VENV_PYTHON. agent-bootstrap now creates the venv if missing, then uses $(VENV_PYTHON) (= .venv-agent/bin/python3) for all pip installs and script invocations. All downstream targets (agent-validate, agent-scorecard, agent-lint, agent-fast-gate, agent-ci-gate, agent-smoke-local, agent-e2e-affected, agent-feature-gate, agent-report) now use $(VENV_PYTHON) consistently. Contributors on PEP-668-enforcing systems can now run 'make agent-bootstrap' without breaking their system Python.
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
Collaborator
|
@KJyang-0114 can you fix precommit failure? you can run it locally via "make precommit-local` |
Collaborator
|
@KJyang-0114 can you fix the pre commit issue and sign the DCO? thanks |
Member
|
close this via done in a separated PR, thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes #1598.
Problem
make agent-bootstrapcallspython3 -m pip install -r tools/agent/requirements.txtdirectly on the system Python. On Homebrew-managed Python environments that enforce PEP 668, this fails with:Solution
Introduce
AGENT_VENV_DIR(default:.venv-agent) andVENV_PYTHON(=.venv-agent/bin/python3).agent-bootstrap: creates the venv if missing, then uses $(VENV_PYTHON) for pip installagent-validate,agent-scorecard,agent-lint,agent-fast-gate,agent-ci-gate,agent-smoke-local,agent-e2e-affected,agent-feature-gate,agent-report): use $(VENV_PYTHON) consistentlyFiles changed
tools/make/agent.mk: +25 lines / -17 linesTesting
.venv-agent/bin/python3and pip install succeeds without PEP 668 errorRisk
Low. Only affects the
make agent-*tooling path. The venv is created on-demand and isolated from the system Python.Rollback
Revert this commit. Contributors who already ran
make agent-bootstrapcan remove.venv-agent/manually.