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

Conversation

graingert-coef
Copy link

@graingert-coef graingert-coef commented Oct 29, 2024

Fixes #279

@graingert-coef
Copy link
Author

ah this fails with:

1.415 Collecting pip-with-requires-python (from -r requirements/runtime-prerequisites.in (line 1))
1.554 
Notice: 1.554 [notice] A new release of pip is available: 24.2 -> 24.3.1
Notice: 1.554 [notice] To update, run: pip install --upgrade pip
1.555 ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
1.555     pip-with-requires-python from https://files.pythonhosted.org/packages/d5/39/0a19612d2822d785f5c22e6042ac0a6af10f99772db751e244d1201f613f/pip_with_requires_python-1.0.1-py2.py3-none-any.whl (from -r requirements/runtime-prerequisites.in (line 1))

@webknjaz
Copy link
Member

Duplicate of #248

@webknjaz webknjaz marked this as a duplicate of #248 Oct 29, 2024
@webknjaz webknjaz closed this Oct 29, 2024
@@ -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.

@graingert-coef graingert-coef deleted the generate-hashes branch October 29, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use hash frozen requirements.txt files (configure pip-compile with --generate-hashes)
2 participants