Skip to content

Document and test local-first pip installs#9

Closed
jianliang00 wants to merge 2 commits into
mainfrom
codex/add-local_first-parameter-for-pip-install
Closed

Document and test local-first pip installs#9
jianliang00 wants to merge 2 commits into
mainfrom
codex/add-local_first-parameter-for-pip-install

Conversation

@jianliang00

Copy link
Copy Markdown
Owner

Motivation

  • Expose and document a local-first installation mode that downloads packages before installing to allow offline or cached installs via PYWRAP_LOCAL_FIRST.
  • Persist the chosen install behavior in the venv marker so venvs are reproducible and their creation parameters are inspectable.
  • Add a regression test to ensure the local_first flag is recorded in the .venv/.pywrap/ok.json marker.

Description

  • Documented the PYWRAP_LOCAL_FIRST environment variable in README.md and its behavior when set to 1.
  • Extended the wrapper (python3) to accept a local_first flag from PYWRAP_LOCAL_FIRST, added a _pip_install helper that performs pip download into a temporary directory then pip install --no-index --find-links when enabled, and ensured the temp download directory is cleaned up.
  • Persisted the local_first boolean into the venv marker written by _write_marker so the metadata includes the install mode.
  • Added a unit test test_local_first_records_marker_flag in tests/test_wrapper.py to validate the marker contains local_first.

Testing

  • Ran the unit test suite with python -m unittest tests/test_wrapper.py and it completed successfully.
  • The test run reported Ran 9 tests and exited OK.

Codex Task

@jianliang00 jianliang00 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant