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

Catch cog.whl invalid filenames #1982

Closed
wants to merge 1 commit into from
Closed

Catch cog.whl invalid filenames #1982

wants to merge 1 commit into from

Conversation

8W9aG
Copy link
Contributor

@8W9aG 8W9aG commented Oct 9, 2024

  • Check if the cog wheel is an invalid filename from the point of view of pip install
  • Change the filename to conform to a valid pip filename.

Fixes: #1963

I believe this was some kind of regression in #1873 however I am not entirely sure what. It's important to note that this does not occur on any development branches, I am quite sure this only occurs in release, but the mechanism as to how this occurs I am not entirely sure of. This in turn makes it hard to create a test case against and makes the code here defensive.

* Check if the cog wheel is an invalid filename
from the point of view of pip install
* Change the filename to conform to a valid pip
filename.
@nickstenning
Copy link
Member

nickstenning commented Oct 9, 2024

I'd honestly much rather we fix the place that's generating incorrect wheels and building them into cog. That shouldn't be the case either with a dev build or with released versions of cog, and we should fix it if it is.

@nickstenning
Copy link
Member

Here's the packages artifact built for the 0.9.26 release. It's called cog-0.9.26-py3-none-any.whl, which seems right.

@nickstenning
Copy link
Member

Ok, well that wasn't too hard. This is the problem.

@nickstenning
Copy link
Member

I think we should probably aim to fix the Homebrew bottle build so it does the right thing rather than hack/patch it like this.

@nickstenning
Copy link
Member

@8W9aG 8W9aG closed this Oct 10, 2024
@8W9aG 8W9aG deleted the catch-cog-whl-filename branch October 10, 2024 14:42
@nickstenning
Copy link
Member

This is now fixed:

$ brew install cog
[...]
$ which cog
/opt/homebrew/bin/cog
$ strings $(which cog) | grep -Eo 'embed/.+.whl'
embed/cog-0.9.26-py3-none-any.whl

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.

cog build --use-cog-base-image=false fails on invalid wheel filename
2 participants