python: add a link_python field for FaaS venv artifacts - #23679
jasonwbarnett wants to merge 1 commit into
Conversation
Pex 2.103.0 added `pex3 venv create --link-python`, which points the created venv's Python at a given path instead of the interpreter that laid the venv out. Since that path need not exist yet, it is what allows laying out a venv for the foreign platform the artifact will run on. Plumb it through `PexVenvRequest` and expose it as `link_python` on the AWS Lambda and Google Cloud Function targets, and upgrade the default Pex to v2.103.1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012imZdyz1fhVXRNKPjbhSDw
|
Verification
Notes for review
|
If you added code that needs a new flag - then the minimum version required is the version that starts providing that flag. Otherwise, you just added an exception for someone who has a custom Claude really sucks for this sort of thing still. Every time a human who is not you corrects Claude's work on your behalf - you should wince. |
|
I knew this, I mostly didn't know what pants' policy/standards where around it which I should have called out! |
Pex 2.103.0 added
pex3 venv create --link-python(pex-tool/pex#3279), which points the created venv's Python at a given path instead of the interpreter that laid the venv out. That path need not exist yet, so a local interpreter can lay out a venv for the foreign platform the artifact will actually run on.This plumbs the flag through
PexVenvRequestand exposes it as alink_pythonfield on the AWS Lambda and Google Cloud Function targets, solayout="venv"works for a cloud runtime — e.g.link_python="/var/lang/bin/python3.13". It also upgrades the default Pex tov2.103.1; the minimum is unchanged.Verification details are in a comment below.
LLM assistance: the code, tests and release note here were written by Claude Code (Opus 5).
🤖 Generated with Claude Code