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

generate hashes #280

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pip-tools.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
allow-unsafe = true
resolver = "backtracking"
strip-extras = true
generate-hashes = true
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ ENV PYTHONPATH "/root/.local/lib/python3.12/site-packages"
COPY requirements requirements
RUN \
PIP_CONSTRAINT=requirements/runtime-prerequisites.txt \
pip install --user --upgrade --no-cache-dir \
pip install --require-hashes --user --upgrade --no-cache-dir \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually auto-activated when constraint or requirements files have at least one hash. But the problem is that the modern depresolver in pip has a bug that prevents us from using this feature: pypa/pip#9243. I keep hoping I'll get to fixing it upstream one day. You can give it a try if you want, though.

-r requirements/runtime-prerequisites.in && \
PIP_CONSTRAINT=requirements/runtime.txt \
pip install --user --upgrade --no-cache-dir --prefer-binary \
pip install --require-hashes --user --upgrade --no-cache-dir --prefer-binary \
-r requirements/runtime.in

WORKDIR /app
Expand Down
10 changes: 7 additions & 3 deletions requirements/runtime-prerequisites.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --allow-unsafe --config=../.pip-tools.toml --output-file=runtime-prerequisites.txt --strip-extras runtime-prerequisites.in
# pip-compile --allow-unsafe --config=../.pip-tools.toml --generate-hashes --output-file=runtime-prerequisites.txt --strip-extras runtime-prerequisites.in
#
pip-with-requires-python==1.0.1
pip-with-requires-python==1.0.1 \
--hash=sha256:1d7dd1e498704b9de379e9e081acdd7ed28268af5f9f54b3367af05e7d2a7457 \
--hash=sha256:ecba3b51cf62c7b9d0b1d6c1ed63060e75ada651a3f056fcf7d20eb02f31fb57
# via -r runtime-prerequisites.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
pip==24.0 \
--hash=sha256:ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc \
--hash=sha256:ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2
# via pip-with-requires-python
Loading