Skip to content

Commit

Permalink
Use --require-hashes when installing requirements.txt
Browse files Browse the repository at this point in the history
This is mostly a safety measure, as pip will automatically enable
require hashes mode when it sees hashes in the requirements.txt file.

Previously we couldn't do this because dh-virtualenv wasn't flexible
enough, but we've now dropped that and can do it directly!

Fixes #1791.
  • Loading branch information
legoktm committed Feb 6, 2024
1 parent 4515a2e commit 62dc60e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debian/setup-venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ WHEELS_DIR="/builder/securedrop-${NAME}/wheels"
PIP_ARGS="--ignore-installed --no-index --find-links ${WHEELS_DIR} --no-deps --no-cache-dir --no-use-pep517"

/usr/bin/python3 -m virtualenv $VENV_ARGS ./debian/securedrop-${NAME}/opt/venvs/securedrop-${NAME}
./debian/securedrop-${NAME}/opt/venvs/securedrop-${NAME}/bin/pip install $PIP_ARGS -r ${NAME}/build-requirements.txt
./debian/securedrop-${NAME}/opt/venvs/securedrop-${NAME}/bin/pip install $PIP_ARGS --require-hashes \
-r ${NAME}/build-requirements.txt
./debian/securedrop-${NAME}/opt/venvs/securedrop-${NAME}/bin/pip install $PIP_ARGS ./${NAME}

# Adjust paths to reflect installed paths
Expand Down

0 comments on commit 62dc60e

Please sign in to comment.