Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendoring (take 2) #1615

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andreasjansson
Copy link
Member

@andreasjansson andreasjansson commented Apr 15, 2024

This PR vendors all Python packages using the vendoring library.

Vendoring allows users to install packages that rely on versions of libraries that are in conflict with Cog's dependencies (e.g. Pydantic, see #1562, #1384, #1186, #1586, #1336, #785).

Vendored packages are gitignored and are sync'd by the default make rule.

Closes #409

@andreasjansson andreasjansson force-pushed the vendoring-take2 branch 6 times, most recently from 06a32c7 to 77b5ff1 Compare April 16, 2024 11:29
@andreasjansson andreasjansson requested review from mattt, nickstenning and technillogue and removed request for nickstenning April 16, 2024 11:32
@nickstenning
Copy link
Member

Had a quick look at this and I think it could work. A couple of thoughts.

  1. I don't think we actually need to check in the files, do we? We have everything pinned in vendor.txt, so maybe let's have vendoring sync be part of the build process for the wheel. This will also help us ensure that we've nailed down any platform-specific stuff like cpython modules. As it is you've got a bunch of Darwin .sos checked in.
  2. You probably want to exclude everything in bin/ too. The shebang lines will be wrong and we don't ever need to use any of the deps as scripts.

@andreasjansson
Copy link
Member Author

Great points @nickstenning. I've implemented your suggestions, much better!

@andreasjansson andreasjansson force-pushed the vendoring-take2 branch 5 times, most recently from f6deb3a to ddaef48 Compare April 16, 2024 17:42
This PR vendors all Python packages using the [vendoring](https://pypi.org/project/vendoring/) library.

Vendoring allows users to install packages that rely on versions of libraries that are in conflict with Cog's dependencies (e.g. Pydantic, see replicate#1562, replicate#1384, replicate#1186, replicate#1586, replicate#1336, replicate#785).

Vendored packages are gitignored and are sync'd by the default `make` rule.

Closes replicate#409

Signed-off-by: andreasjansson <andreas@replicate.ai>
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.

Vendor Python dependencies
2 participants