-
-
Notifications
You must be signed in to change notification settings - Fork 614
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 with remote URLs #700
Comments
Thanks for the report @blueyed That sounds like a good idea, it's a user given parameter, we should keep it in the output. |
I've tried to install the editable package:
and got this error:
@blueyed it seems there is no way to pip install editable packages with hash compare. See the issue in pip. |
@atugushev |
@blueyed
and got this error:
Just wandering how did you compile non-editable URL package? |
@atugushev |
For
|
@atugushev
I am using this to transform/compile requirements: $(PIP_REQUIREMENTS_ALL):: $(PIP_REQUIREMENTS_DIR)/%.txt: $(PIP_REQUIREMENTS_DIR)/%.in
@pip-compile --no-header --generate-hashes $(PIP_COMPILE_ARGS) --output-file "$@.tmp" "$<" >"$@.out" || { \
ret=$$?; echo "pip-compile failed:" >&2; cat "$@.out" >&2; \
$(RM) "$@.tmp" "$@.out"; \
exit $$ret; }
@sed -n '1,10 s/# Depends on/-r/; s/\.in/.txt/p' "$<" > "$@"
@# Keep and transform '-e git+' as-is (includes the hash).
@sed -n -e '/-e git+/ {s~^-e git+\(http.*\)@\([^#]\+\)\(#.*\)\?~\1/archive/\2.tar.gz\3~; s~\.git/archive~/archive~; p}' "$<" >> "$@"
@# Remove any editables (not supported with hashes).
@sed -e '/^-e /d' "$@.tmp" >> "$@"
@$(RM) "$@.tmp" "$@.out" The relevant part is |
I think the underlying goal of using --generate-hashes with remote URLs is working after #807. Running on master:
Would it still be useful to preserve |
@jcushman |
When using a requirement like
-e git+https://github.com/lock8/django-rest-framework.git@d9ee7d68178a6b50b55caacdb50a531b2cc0eaf6#egg=djangorestframework --hash=sha256:8a25e5ea1727e83bb55c3459b1116161ebf67314696672227a053265564c6af9
pip-compile with--generate-hashes
generates:I.e. it removes the
--hash
that is already there.pip install complains:
Note that pip-tools requires the
-e
for remote URLs in general, and that I turn it intohttps://github.com/lock8/django-rest-framework/archive/d9ee7d68178a6b50b55caacdb50a531b2cc0eaf6.tar.gz#egg=djangorestframework
manually after pip-compiles runs over it.As a quick fix I suggest keeping the
--hash
from the.in
file?!The text was updated successfully, but these errors were encountered: