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

Remove gurobipy license file from conda downloads #3

Merged
merged 7 commits into from
Apr 26, 2024
Merged

Conversation

simonbowly
Copy link
Collaborator

@simonbowly simonbowly commented Apr 26, 2024

The conda packages include a license file which will only work from Python. So currently, if the user does not have a Gurobi license on their machine, they'll get a confusing error message:

PIP license can only be used from gurobipy interface

This PR is to delete the license file in the extracted artifact dir so that we get a more sensible message:

No Gurobi license found

@simonbowly
Copy link
Collaborator Author

@odow I couldn't see an obvious way to strip files out as an artifact is downloaded, but force-deleting the gurobi.lic files at import time seems to do the trick. Does that seem reasonable, or is there a better approach?

@odow
Copy link
Member

odow commented Apr 26, 2024

This seems okay. I just pushed a commit to test using the (undocumented) global constant artifact_dir.

I'm not sure what the consequence of modifying an artifact like this is. They're usually meant to be immutable, so the package manager might re-download the artifact it it notices the SHA doesn't match? Or perhaps once unpacked, it never re-verifies. (The SHA is the directory name, so it might just check if the folder exists.)

test/runtests.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
@simonbowly
Copy link
Collaborator Author

Thanks. In my testing of it so far, it seems to just unpack once and never verify later (I suppose it could be expensive to verify on every import). But I couldn't find any clear statement in the docs re: when or if this is re-checked.

@odow odow merged commit da3ed30 into master Apr 26, 2024
7 checks passed
@odow odow deleted the sb/delete-license branch April 26, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants