-
-
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
log which python version to use/was used #827
Comments
Would be great to also log the pip version used. Some packages have minimum pip versions (as I'm finding out now), so if you run your pip-compile in an environment with a different pip version from the one you're installing into (e.g. fresh and new and 19.x on your local laptop, but stuck at 9.x on ubuntu in the docker container), it's possible to get installation incompatibility errors. This'll help users identify that could be an environment difference causing issues. |
@riordan the pip version is already logged if packages eronously depend on pip Also you can use |
Hello @riordan! You could use |
Yeah, that should also work. Shouldn't we have |
`--require-hashes` is only useful when passed as a cli directly to the pip
invocation
…On Fri, 15 Nov 2019, 02:53 Albert Tugushev, ***@***.***> wrote:
@graingert <https://github.com/graingert>
Also you can use pip install --no-deps --require-hashes -r
requirements.txt to avoid pip dependency resolution getting in the way
Yeah, that should also work. Shouldn't we have --no-deps and
--require-hashes in pip-sync as well?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#827?email_source=notifications&email_token=AADFATG7ENQ2RQHKW4LDK5DQTYFLFA5CNFSM4HQBART2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEEDVYA#issuecomment-554187488>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADFATCN2Y4UCGKEBZPJIXTQTYFLFANCNFSM4HQBARTQ>
.
|
|
FWIW, zsh wrapper to accomplish this: pip-compile-withpyver () {
CUSTOM_COMPILE_COMMAND=$(
print -l \
"pip-compile ${(j: :)@}" \
'#' \
"# Last compiled with: ${(j: :)${(f)$(python -V)}}"
) pip-compile $@
} $ pip-compile-withpyver --generate-hashes requirements.in #
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --generate-hashes requirements.in
#
# Last compiled with: Python 3.6.9 (1608da62bfc71e8ac775121dd0b21bb72e61c6ea, Dec 25 2019, 02:47:23) [PyPy 7.3.0 with GCC 9.2.0]
#
... |
* log which python version to use/was used Fixes #827 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update writer.py * Update writer.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix tests Co-authored-by: Sorin Sbarnea <[email protected]>
eg add this to the header:
The text was updated successfully, but these errors were encountered: