-
-
Notifications
You must be signed in to change notification settings - Fork 628
Add envvar for emit index url #2192
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
base: main
Are you sure you want to change the base?
Conversation
When somebody has a custom global index-url defined in their pip conf pip-compile ends up placing it into the generated requirements.txt Not only does it place in the index url, it also places any authentication credentials. By exposing PIP_TOOLS_EMIT_INDEX_URL as an environment variable we will enable users with a custom global index-url set to change the default behaviour of pip-compile to false for including it via an envvar.
for more information, see https://pre-commit.ci
README.md
Outdated
- [pip-compile-multi](https://pip-compile-multi.readthedocs.io/en/latest/) - pip-compile command wrapper for multiple cross-referencing requirements files. | ||
- [pipdeptree](https://github.com/tox-dev/pipdeptree) to print the dependency tree of the installed packages. | ||
- `requirements.in`/`requirements.txt` syntax highlighting: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's the unstable prettier
hook inserting noise.
If the initial commit is rebased (discarding the pre-commit.ci fixup), it shouldn't happen again, since we removed that hook.
|
||
- [pip-compile-multi](https://pip-compile-multi.readthedocs.io/en/latest/) - pip-compile command wrapper for multiple cross-referencing requirements files. | ||
- [pipdeptree](https://github.com/tox-dev/pipdeptree) to print the dependency tree of the installed packages. | ||
- `requirements.in`/`requirements.txt` syntax highlighting: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `requirements.in`/`requirements.txt` syntax highlighting: | |
- `requirements.in`/`requirements.txt` syntax highlighting: | |
"--emit-index-url/--no-emit-index-url", | ||
is_flag=True, | ||
default=True, | ||
envvar="PIP_TOOLS_EMIT_INDEX_URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs tests and docs.
When somebody has a custom global index-url defined in their pip conf pip-compile ends up placing it into the generated requirements.txt
Not only does it place in the index url, it also places any authentication credentials.
By exposing PIP_TOOLS_EMIT_INDEX_URL as an environment variable we will enable users with a custom global index-url set to change the default behaviour of pip-compile to false using the envvar.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.