-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Add an option to not include paths in annotations #1084
Comments
To be clear, you want the req-file's basename included in these annotations? |
I don't really care about the basename either, although I wouldn't mind if it was included. |
As a workaround for this I just have a wrapper script do a
#!/bin/bash
REPO_DIR="$(realpath "$(dirname "$0")/..")"
cd "$REPO_DIR" || exit 1
CUSTOM_COMPILE_COMMAND="scripts/make-requirements-txt" \
pip-compile \
"requirements.in" \
-v \
--generate-hashes \
"$@" |
I think I'm going to cancel this request, because it's a very specific use case, and in the end I worked around it by just removing the paths from the resulting Instead, I'm giving my vote to #1377, which is a lot more general and, if implemented, would help resolve this issue as well. |
What's the problem this feature will solve?
My workflow involves using
pip-compile
on a requirements file from a software package installed on the local computer. This means that the output file includes annotations likevia -r /opt/foobar/requirements.txt
. However:As a result of this, different people (or the same person at different times) may get different annotations in
pip-compile
's output, resulting in unnecessary diffs.Describe the solution you'd like
An option like
--no-paths-in-annotations
that would replace the annotation with something likevia -r [...]
. Alternatively,pip-compile
could automatically do it for any requirements file paths that are absolute.Alternative Solutions
--no-annotations
solves this, but it also removes annotations about package dependencies, which are nice to have.The text was updated successfully, but these errors were encountered: