py-constraints

./pants py-constraints [args]

Determine what Python interpreter constraints are used by files/targets.

Config section: [py-constraints]

Basic options

output_file

--py-constraints-output-file=<path>
PANTS_PY_CONSTRAINTS_OUTPUT_FILE
default: None

Output the goal's stdout to this file. If unspecified, outputs to stdout.


summary

--[no-]py-constraints-summary
PANTS_PY_CONSTRAINTS_SUMMARY
default: False

Output a CSV summary of interpreter constraints for your whole repository. The headers are `Target`, `Constraints`, `Transitive Constraints`, `# Dependencies`, and `# Dependees`.

This information can be useful when prioritizing a migration from one Python version to another (e.g. to Python 3). Use # Dependencies and # Dependees to help prioritize which targets are easiest to port (low # dependencies) and highest impact to port (high # dependees).

Use a tool like Pandas or Excel to process the CSV. Use the option --py-constraints-output-file=summary.csv to write directly to a file.


Advanced options

None

Deprecated options

None

Related subsystems

download-pex-bin, grpc_python_plugin, pex, protoc, py-constraints, python-infer, python-native-code, python-protobuf, python-protobuf.mypy-plugin, python-repos, python-setup, shell-setup, shellcheck, source, subprocess-environment


Did this page help you?