jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.67k stars 608 forks source link

Add `--proxy` flag to `pip-sync` command to support the same functionality as `pip install --proxy` #2033

Closed tomdaley92 closed 8 months ago

tomdaley92 commented 8 months ago

What's the problem this feature will solve?

Use a on-prem pypi cache/proxy with pip-sync command

Describe the solution you'd like

Add the flag --proxy to the pip-sync command to behave the exact same way as pip install --proxy https://some-proxy. I figured since pip-sync let's you add trusted hosts etc. etc. it would be in this step, rather than the pip-compile step. Thoughts?

Alternative Solutions

Use the native way of installed to venv via pip. e.g. pip install --proxy https://some-pypi-cache --requirement requirements.txt.

Not sure if behaviour is the same of not but you could also just use the flag --index-url with pip-sync instead?

Additional context

Is this out of scope for intended functionality of the pip-tools project? It would be nice if pip-sync just wrapped (fell back to) most of the common functionality of pip if it does not need to be implemented any differently.

AndydeCleyre commented 8 months ago

Just checking:

Can this not be done with --pip-args already?

tomdaley92 commented 8 months ago

@AndydeCleyre It probably can.. Thank you ☺️ . I guess I didn't read through the help text carefully enough.

webknjaz commented 8 months ago

Closing per above.