Generate lockfiles for third-party dependencies.
Backend: <span style="color: purple"><code>pants.core</code></span> Config section: <span style="color: purple"><code>[generate-lockfiles]</code></span>
## Basic options
<div style="color: purple">
### `resolve
`
<code>--generate-lockfiles-resolve="['<str>', '<str>', ...]"</code><br> <code>PANTS_GENERATE_LOCKFILES_RESOLVE</code><br>
</div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>[]</code></span>
<br>
Only generate lockfiles for the specified resolve(s).
Resolves are the logical names for the different lockfiles used in your project. For your own code's dependencies, these come from backend-specific configuration such as `[python].resolves
`. For tool lockfiles, resolve names are the options scope for that tool such as `black
`, `pytest
`, and `mypy-protobuf
`.
For example, you can run `pants generate-lockfiles --resolve=black --resolve=pytest --resolve=data-science
` to only generate lockfiles for those two tools and your resolve named `data-science
`.
If you specify an invalid resolve name, like 'fake', Pants will output all possible values.
If not specified, Pants will generate lockfiles for all resolves.
</div> <br>
<div style="color: purple">
### `diff
`
<code>--[no-]generate-lockfiles-diff</code><br> <code>PANTS_GENERATE_LOCKFILES_DIFF</code><br>
</div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>False</code></span>
<br>
Print a summary of changed distributions after generating the lockfile.
</div> <br>
<div style="color: purple">
### `diff_include_unchanged
`
<code>--[no-]generate-lockfiles-diff-include-unchanged</code><br> <code>PANTS_GENERATE_LOCKFILES_DIFF_INCLUDE_UNCHANGED</code><br>
</div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>False</code></span>
<br>
Include unchanged distributions in the diff summary output. Implies `diff=true
`.
</div> <br>
## Advanced options
<div style="color: purple">
### `custom_command
`
<code>--generate-lockfiles-custom-command=<str></code><br> <code>PANTS_GENERATE_LOCKFILES_CUSTOM_COMMAND</code><br>
</div> <div style="padding-left: 2em;"> <span style="color: green">default: <code>None</code></span>
<br>
If set, lockfile headers will say to run this command to regenerate the lockfile, rather than running `pants generate-lockfiles --resolve=<name>
` like normal.
</div> <br>
## Deprecated options
None
## Related subsystems
[environments-preview](🔗)