Skip to content

Support --hash on the command line #3257

@erikrose

Description

@erikrose

#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:

pip install foo==1.0 --hash=sha256:hash_for_foo12345 \
            bar==2.0 --hash=sha256:hash_for_bar12345 --hash=sha256:another_hash_for_bar12345

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions