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.6k stars 607 forks source link

[FR] Offer an example usage command in the default header comment #2064

Open webknjaz opened 4 months ago

webknjaz commented 4 months ago

What's the problem this feature will solve?

There's confusion as to how the output files are to be used and the header only shows how they were generated.

Describe the solution you'd like

I want the header to have an example on using the generated files as constraint. Specifically, suggesting to perform the installation via PIP_CONSTRAINT=requirements.txt pip install -r requirements.in -c requirements.txt. With the proper filenames, of course.

Alternative Solutions

Letting the confusion live on..?

Additional context

This idea occurred to be having observed how different people have different expectations about using the pip-compile generated files in #2051.

chrysle commented 4 months ago

Is explicitly specifying PIP_CONSTRAINT needed when using the -c option on the command line?

webknjaz commented 4 months ago

Is explicitly specifying PIP_CONSTRAINT needed when using the -c option on the command line?

This is for the constraints to leak into the ephemeral PEP 517 build env provisioning subprocess.