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.69k stars 610 forks source link

Add `-c/--constraint` option to `pip-compile` #1936

Closed atugushev closed 1 year ago

atugushev commented 1 year ago
Contributor checklist
Maintainer checklist
atugushev commented 1 year ago

Thanks for the review @AndydeCleyre 🙏🏻

AndydeCleyre commented 1 year ago

Not that it matters, but "not-an-list" -> "not-a-list"

honnix commented 8 months ago

Thank you so much for adding this command line option! It seems only local file is supported. Is that correct? pip, however can use constraints file from any URL: https://pip.pypa.io/en/stable/user_guide/#constraints-files. Maybe that could be supported as well by pip-compile?

honnix commented 8 months ago

Maybe it could be as simple as removing click.Path type? That would skip local file validation unfortunately.

Updated: I tried that locally and it seems working.

honnix commented 8 months ago

I proposed a change in #2038. We could go extra steps to validate local file and remote file, but it doesn't seem to be absolutely necessary.