-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Support --hash on the command line #3257
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
Comments
Linking with #4659. |
Is switching from |
What is necessary is to have an option structure that is supported by our command line parser. The proposed structure needs to interleave non-option arguments and options, which optparse doesn't support. If you want to propose a different UI, which works with optparse, then switching to click might no longer be a prerequisite. But personally, I can't think of any UI that wouldn't be clumsy here. The UI proposed by the OP here strikes me as being "less bad" rather than actually good. And given that I don't think the arguments for needing this feature are very strong in the first place, I'm not in favour of a bad UI for a not-very-useful feature... |
Workaround in some cases can be to use an anonymous pipe to "fake" a requirements.txt:
[tested with bash] |
#3137 supports specifying package hashes using --hash in requirements files. The next step is to support --hash on the command line so, both for consistency and for the convenience of not having to make a temporary requirements file just to install a package while checking against a hash.
A prerequisite to this is probably to change from optparse to click, which supports the interleaving of options and arguments on the command line. @dstufft mentioned an interested in making this switch at one point. The intent is for this to work:
The text was updated successfully, but these errors were encountered: