Skip to content

feat: support local package artifacts in requirements#3095

Open
anish-sahoo wants to merge 1 commit into
mainfrom
issue-1945
Open

feat: support local package artifacts in requirements#3095
anish-sahoo wants to merge 1 commit into
mainfrom
issue-1945

Conversation

@anish-sahoo

@anish-sahoo anish-sahoo commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • support simple local wheel/source archive paths in build.python_requirements
  • stage referenced artifacts through the existing cog_build context before pip install
  • document supported requirements syntax and add unit/integration coverage

Fixes #1945

Supported examples

Users can list local artifacts directly in their requirements file:

./dist/mylib-0.1.0-py3-none-any.whl
./vendor/helperlib.zip
./packages/localpkg.tar.gz

Paths are resolved relative to the requirements file and must point to regular files inside the project. Cog stages those files before the generated pip install -r /tmp/requirements.txt layer, without copying the full source tree earlier.

Not supported in this PR:

  • build.run: pip install ./artifact.zip
  • local package directories
  • name @ file:...
  • local --find-links directories
  • recursive local requirements includes
  • inline hashes/options on local artifact lines

@anish-sahoo anish-sahoo requested a review from a team as a code owner July 7, 2026 21:10
@ask-bonk

ask-bonk Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@anish-sahoo anish-sahoo changed the title Support local package artifacts in requirements feat: support local package artifacts in requirements Jul 7, 2026
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.

Installing local packages during cog build

1 participant