Skip to content

Reinstall deps when local-first or pip args change#10

Merged
jianliang00 merged 1 commit into
mainfrom
codex/add-local_first-parameter-for-pip-install-e3vup8
Jan 7, 2026
Merged

Reinstall deps when local-first or pip args change#10
jianliang00 merged 1 commit into
mainfrom
codex/add-local_first-parameter-for-pip-install-e3vup8

Conversation

@jianliang00

Copy link
Copy Markdown
Owner

Motivation

  • Ensure changes to PYWRAP_PIP_ARGS or PYWRAP_LOCAL_FIRST trigger dependency reinstalls by including them in the venv marker check.
  • Provide a local-first installation mode that downloads packages before installing to support offline or cached installs.
  • Persist installation options in the venv marker so environment creation is reproducible and inspectable.

Description

  • Include pip_args and local_first in the marker validation so marker mismatches will trigger reinstall when these settings change.
  • Extend _install_deps to accept a local_first flag and implement a _pip_install helper that uses pip download into a temporary directory and then pip install --no-index --find-links when local_first is enabled, with cleanup of the temp dir.
  • Write pip_args and local_first into the .venv/.pywrap/ok.json marker when creating/updating the marker.
  • Document PYWRAP_LOCAL_FIRST in README.md and add the unit test test_local_first_records_marker_flag in tests/test_wrapper.py.

Testing

  • Ran the unit test suite with python -m unittest tests/test_wrapper.py.
  • The test run reported Ran 9 tests and exited OK.
  • The new test test_local_first_records_marker_flag passed as part of the suite.

Codex Task

@jianliang00 jianliang00 force-pushed the codex/add-local_first-parameter-for-pip-install-e3vup8 branch from 09d1275 to 1971db4 Compare January 7, 2026 14:14
@jianliang00 jianliang00 merged commit 6fa935c into main Jan 7, 2026
3 checks passed
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