Vendoring (take 2)
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 https://github.com/replicate/cog/issues/1562, https://github.com/replicate/cog/issues/1384, https://github.com/replicate/cog/issues/1186, https://github.com/replicate/cog/issues/1586, https://github.com/replicate/cog/issues/1336, https://github.com/replicate/cog/issues/785).
Vendored packages are gitignored and are sync'd by the default make rule.
Closes https://github.com/replicate/cog/issues/409
Had a quick look at this and I think it could work. A couple of thoughts.
- 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 havevendoring syncbe 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. - 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.
Great points @nickstenning. I've implemented your suggestions, much better!
Closing in favor of #1687. I think we're close, but if we can't manage to get that working, this is probably the next best alternative.